Subject: kern/7731: there is no way to enforcing bsd group semantics on nfs mounts
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/07/1999 17:50:54
>Number:         7731
>Category:       kern
>Synopsis:       there is no way to enforcing bsd group semantics on nfs mounts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun  7 17:50:00 1999
>Originator:     Luke Mewburn
	The NetBSD Foundation
>Release:        Tue Jun  8 10:35:33 EST 1999
System: NetBSD 1.4C NetBSD 1.4C (LUKEM) #139: Tue Jun 1 11:36:43 EST 1999 i386

	I recently migrated from a local copy of /usr/src to one NFS mounted
	off one of my NetApp filers.

	I noticed that new files on the NFS mount are being created with
	my primary group (SYSV behaviour), instead of the group of the
	parent directory (BSD behaviour).

	The workaround is to use what I used on my Solaris clients for
	a long time; set the setgid bit on the parent directory. I don't
	need this anymore on Solaris since I discovered the `grpid' mount
	option which enforces BSD semantics.

	The setgid behaviour wasn't documented anywhere in NetBSD as far
	as I can tell (chmod(1), chmod(2), etc).

	I find it ironic that a SYSV derived system can enforce BSD
	semantics in this situation, but a BSD derived system requires
	a SYSV hack to function correctly. ;-)

	I don't want to setgid all my directories again; setgid on a
	directory has a different lossage mode under Solaris (if the
	umask is set to mask out group execute, new directories will
	be made with g+l (mandatory locking) instead of g+s (setgid),
	as the 2000 bit is inherited by the directory in all situations.
	This is lame, but not our bug :)

	NFS mount a directory off a NetApp fileserver (and maybe others?)
	Create some files. Notice that they have your primary group as
	their group unless the parent directory has the setgid bit set.

	I suggest that we either:
	    * fix our NFS client so that it always has BSD semantics
	    * provide a `grpid' mount option for mount_nfs (yuck!)