From owner-freebsd-questions Tue Apr 25 8:57:22 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ren.sasknow.com (ren.sasknow.com [207.195.92.131]) by hub.freebsd.org (Postfix) with ESMTP id 4D2D637BD6E for ; Tue, 25 Apr 2000 08:57:18 -0700 (PDT) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ren.sasknow.com (8.9.3/8.9.3) with ESMTP id JAA64661 for ; Tue, 25 Apr 2000 09:58:09 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Tue, 25 Apr 2000 09:58:09 -0600 (CST) From: Ryan Thompson To: freebsd-questions@freebsd.org Subject: File creation using non-member group! Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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