Inheriting group ownership under Red Hat Linux?

Carl Riches riches at ms.washington.edu
Thu Jun 24 00:20:34 UTC 2004


On Wed, 23 Jun 2004, alan wrote:

> On Wed, 23 Jun 2004, Carl Riches wrote:
>
> >
> > For example, let's say that there is directory:
> >
> >     drwxrwxr-x    2 root     fugroup        4096 Jun  8 11:45 fubar/
> >
> > Let's say that user "riches" creates a file in directory fubar/.  The
> > primary group for user "riches" is "staff", but that user also belongs
> > to "fugroup" and can write to the fubar/ directory.  The file created in
> > that directory is owned by "riches:staff", not "riches:fugroup".
> >
> > This breaks some things, e.g. file sharing between a working group.
> >
> > Does anyone know how to work around this?  That is, is this a known
> > problem or do we have some sort of configuration problem?
>
> Look at the man page for "chmod".  You need to set the sticky bit for
> group on that directory.
>

We'd thought of that, but this is _not_ needed under other versions of
Unix.  In fact, we discovered the problem when a working group tried to
use a shared directory (via NFS) under Linux and under Unix.  Files
touched by one user under Linux could not be used by any other user,
while work done under Unix did not have this problem.

I just tried your suggestion.  It failed.  I created a directory with me
as the owner and a secondary group to which I belong as the group owner.
I then ran "chmod 1775" on the directory.  Any file I create in that
directory has my primary group as the group owner.

How do I get the files to inherit the group ownership of the directory.

Carl

Carl G. Riches
Software Engineer
Department of Mathematics
Box 354350			voice:     206-543-5082 or 206-616-3636
University of Washington	fax:       206-543-0397
Seattle, WA  98195-4350		internet:  riches at ms.washington.edu





More information about the redhat-list mailing list