I posted a little while back about a problem we are having where when a
new directory gets created over NFS on a Solaris NFS server from a Linux
NFS client, the new directory group ownership is that of the primary group
of the process, even if the parent directory has the sgid bit set and is
owned by a different group.
Basically, a Solaris client in such an instance explicitly requests that
the new directory be owned by the group of the parent directory, and the
server follows that request. A Linux NFS client, on the other hand, does
not explicitly request any particular group ownership for the new
directory, leaving the server to decide that on its own, which in the case
of the Solaris server, is not the "right" group.
The POSIX spec on this is somewhat ambiguous, so you can't really say the
Solaris implementation is "broken", but while perhaps following the letter
of the spec, I don't think it's following the spirit of the sgid bit on
I have a CR, #6894234, which is currently being reviewed through Sun
support. It seems their current inclination is to not change the behavior.
Again, while not technically broken, I would argue this behavior is
undesirable. The semantics of the sgid bit on directories are that new
subdirectories should be owned by the group of the parent directory. That's
what happens under Solaris for local file system access. That's what
happens under Solaris if a directory is made via NFS from a Solaris NFS
client. It's not what happens when a new directory is created via NFS from
a Linux NFS client, or any other NFS client that does not explicitly
request the group ownership when creating a directory. While POSIX does not
explicitly specify what a server should do when creating a new directory
and the client does not specify the group ownership, in the case where the
new directory resides in an existing directory with the sgid bit set,
following standard sgid bit directory group ownership semantics seems the
most appropriate thing to do.
If any Sun engineers with an interest in improved interoperability and
keeping true to the spirit of the sgid bit could take a look at this CR and
weigh in on its final resolution, that would be greatly appreciated.
Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst | henson@xxxxxxxxxxxxx
California State Polytechnic University | Pomona CA 91768
zfs-discuss mailing list