Subject: Re: ffs & directory gids
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 11/06/1999 06:29:20
In article <Pine.NEB.4.10.9911052052350.1591-100000@server.int.duh.org>,
Todd Vierling <tv@pobox.com> wrote:
>I proposed something like this a while ago, and now that I have a little
>time to get some pending ideas done, I'd like to propose a ffs (and related
>fs's) mount option that can turn on SVR4-style directory entry gid handling.
>That is, files created in a directory have the owner's default gid, not the
>gid of the directory, unless the directory itself is set-gid.
>
>This would also involve adding appropriate set-gid bits to the base mtree
>files, so that the proper places would work as expected if the option were
>turned on for /.
>
The problem is that the default behavior for BSD systems has been that
file creation follows the group id of the directory. SunOS-4.x changed
that so that the default is the effective gid of the process unless the
filesystem is mounted with grpid set, or the directory has the setgid
bit set.
I have never found the non grpid (sysv) behavior useful, on the
other hand I have been annoyed many times by the fact that when
mounting nfs from other systems, we effectively choose the sysv
behavior, because our mkdir does not inherit the setgid flag from
the parent directory.
I'd say that if we are going to change things, we should change
them in an incompatible way compared to the way things are right
now, i.e. following all the major vendors.
That would require us to change the default behavior to be the sysv one,
requiring grpid to be set for the bsd behavior, and inheriting setgid
on directories.
I know that this is heretic POV, but it will help our interoperability
with other OS's, hurting our compatibility with the current behavior.
christos