Date: Tue, 25 Apr 2000 09:58:09 -0600 (CST) From: Ryan Thompson <ryan@sasknow.com> To: freebsd-questions@freebsd.org Subject: File creation using non-member group! Message-ID: <Pine.BSF.4.21.0004250942330.64330-100000@ren.sasknow.com>
next in thread | raw e-mail | index | archive | help
Hmm... Just noticed that on one of my accounts the real gid of the user is not being used in file creation (non-setgid/sticky directory, of course!) Id shows something like this: uid=1000(staffer) gid=20(staff) groups=20(staff), 2000(other), 2015 ... approximately 10 groups. Certainly not pressing the limit. etc... thing to note here is gid=1000(privil) is NOT in that list of groups, and that the output matches what I have set in /etc/master.passwd and /etc/group. In a non-anything directory: $ > test.file && ls -l test.file -rw-rw-r-- 1 staffer privil 0 Apr 25 09:41 test.file ``privil'' is gid=1000, which staffer is definitely not a member of! Just for kicks: $ chgrp staff test.file -rw-rw-r-- 1 staffer staff 0 Apr 25 09:41 test.file So, the ``staff'' group does exist and function.. It's just not being used for file creation! For some real fun: $ chgrp privil test.file chgrp: you are not a member of group privil Hmmm indeed! It looked like I was a minute ago :-) Is there some reason that FreeBSD appears to be using gid=uid in this case for the file create, even though the user's real gid has been set to a different number? I would go source-hunting, and try different test cases, but someone here probably has a quick answer anyway. If it 'is' a bug and not some really obfuscated feature, I'll submit a patch. This behaviour persists at least as far back as 3.4-STABLE, through to yesterday's 4.0-STABLE. Thanks, - Ryan -- Ryan Thompson <ryan@sasknow.com> Systems Administrator, Accounts Phone: +1 (306) 664-1161 SaskNow Technologies http://www.sasknow.com #106-380 3120 8th St E Saskatoon, SK S7H 0W2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004250942330.64330-100000>