SUMMARY: PC-NFS Pro ignores setgid on directories

From: Steve Ehrhardt (stevee@sbei.com)
Date: Mon Aug 28 1995 - 18:23:19 CDT


Thanks to all of you who took the time to consider my problem, and
in particular to

bern@uni-trier.de
aclarke@mpc-uk.com
tfb@aiai.ed.ac.uk

who replied with specific suggestions. Two of these replies pointed to the
same possibility.

BSD and System V systems differ in how they select what GID to use
when a file is created. BSD systems use the group membership of the
directory, while System V systems use the GID of the calling process.
(Suns default to the former behaviour unless the -grpid flag is used when
the filesystem is mounted. See the "mount" man page for more details.)

On both types of systems, however, the set-GID bit on the parent
directory overrides the default semantics. In other words, this
shouldn't have made any difference in my case. The -grpid option
would normally have provided me with a workaround for my immediate
problem, but PCNFS-Pro seems not to have an equivalent option!

I subsequently contacted SunService, and found (not surprisingly)
that this is a *BUG*. There is a problem/bug ID (#1211374), but no
patch/workaround yet. Sun's working on it, and when I hear anything
further, I'll pass it on to the list.

Following are the original post and replies:
 
> Hi,
>
> I'm hoping that one of you kind, wonderful, intelligent people will know
> what's going on here...
>
> Situation:
>
> PC running MS-DOS 6.22, WFW 3.11, PC-NFS Pro 1.1 w/patches 102467-01, 102485-01.
> Server Running SunOS 4.1.4, rpc.pcnfsd V2.0
>
> Problem:
>
> When creating or re-writing a file on a network drive, the setgid bit on the
> directory seems to be ignored.
>
> Example:
>
> User named xyzzy is a member of groups staff and qa.
> (Staff is the default group defined in the passwd entry.)
>
> This user creates a file named "newfile" in directory "foo".
>
> foo looks like:
>
> drwxrwsr-x 2 root qa 512 Aug 15 13:09 foo
>
> When newfile is created here, it looks like:
>
> -rw-r--r-- 1 xyzzy staff 0 Aug 15 13:05 newfile
>
> Newfile should belong to group qa, *not* staff!
>
> Can anyone explain why this is happening? It seems like PC-NFS Pro is
> doing a "chgrp" operation after creating the file. Whatever it is
> doing, it's creating major problems with file sharing here.
>
> Thanks in advance for your help!
>
> Steve Ehrhardt stevee@sbei.com
> SBE Inc. (510)355-7773
> San Ramon,CA
> "The opinions expressed are those of the author. His employer would disavow
> any knowlege of them, presuming they knew that he had any."
>
> From bern@TI.Uni-Trier.DE Wed Aug 16 02:35:38 1995
>
> > PC running MS-DOS 6.22, WFW 3.11, PC-NFS Pro 1.1 w/patches 102467-01, 102485-01.
> > Server Running SunOS 4.1.4, rpc.pcnfsd V2.0
> > This user creates a file named "newfile" in directory "foo".
> > drwxrwsr-x 2 root qa 512 Aug 15 13:09 foo
> > -rw-r--r-- 1 xyzzy staff 0 Aug 15 13:05 newfile
> > Newfile should belong to group qa, *not* staff!
>
> Sure about that? My 4.1.3_U1B chmod Manpage states:
>
> 2000 Set group ID on execution (this bit is ignored if
> the file is a directory; it may be set or cleared
> only using symbolic mode).
>
> Regards,
> J. Bern
> --
> /\ /""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""\
> / \/ bern@uni-trier.de (Size Limit!) | P.O. Box 1203 | Ham: \/\
> / J. \ bern@ti.uni-trier.de (SUNAttachm.OK) | D-54202 Trier | DD0KZ / \
> \Bern/ No Finger etc.; Use Mail (Subj. "##" for Autoreply List) and \ /
> \ /\ WWW. /\/
> \/ \____________________________________________________________/
>
> From aclarke@mpc-uk.com Wed Aug 16 03:59:54 1995
>
> BSD and SVR4 have different understandings of the setgid bit. I had the same
> problem between an Ultrix server and Solaris clients. The solution was to set
> the grpid mount option. If PCNFS allows this, I suggest you try the same.
>
> Anthony
>
> From tfb@aiai.ed.ac.uk Thu Aug 17 04:42:55 1995
>
> * Steve Ehrhardt wrote:
>
> > When creating or re-writing a file on a network drive, the setgid bit on the
> > directory seems to be ignored.
>
> I think that listening to the setgid bit is a property of the machine
> that mounts the disk not the one that exports it (I think this because
> you can NFS mount things w/o grpid even if the server has mounted them
> with grpid, and you get sysv grp semantics on the client, so I assume
> that the setgid stuff is like that).
>
> Of course this doesn't *help* other than that it gives a hint who's
> fault this is, and means that pocnfs doesn't have to do a
> chrgrp. Perhaps there is an option somewhere in pcnfs that makes this
> work? If not I guess it's a bug.
>
> --tim
>

Thanks again for the help, and I'll be cure to pass on the final answer
when one becomes available.

Steve Ehrhardt stevee@sbei.com
SBE Inc. (510)355-7773
San Ramon,CA
"The opinions expressed are those of the author. His employer would disavow
        any knowlege of them, presuming they knew that he had any."

 



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:32 CDT