Inheriting group ownership under Red Hat Linux?

alan alan at clueserver.org
Wed Jun 23 23:05:08 UTC 2004


On Wed, 23 Jun 2004, Carl Riches wrote:

> 
> We are running into a problem that did not occur under our Unix systems:
> inheriting group ownership on files.  The problem is that a file created
> in a directory does not inherit the group ownership of the directory.
> Rather it gets the group ownership of the user that created the file.
> 
> Under our other Unix systems, a file would get the group ownership of the
> directory where it was created.
> 
> 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.






More information about the redhat-list mailing list