Re: Users, Groups, and Sticky Bits, oh my!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Steffen Kluge wrote:

> On Thu, 2004-06-17 at 05:38, John Nichel wrote:
>> Let's say I have a directory named 'bob', owned by 'foo' and in the
>> group 'bar', with rwxrwxr-w permissions.  How can I make it to where
>> when a file/directory is created in the 'bob' directory is owned by
>> 'foo' and in the group 'bar' with permissions of 664/775 no matter who
>> creates the file/directory?
> 
> You can't do anything about the owner of the new files/directories,
> it'll be whoever created them. However, you can propagate the group
> ownership by setting the parent directory g+s, as in "chmod g+s bar" or
> "chmod 2775 bar".
>

Out of interest, why do you want to set the owner of files to foo? If all
the users are members of the group "bar" it doesn't matter who owns them
(unless you want all users to be able to change permissions on the file, I
suppose).
 
> The file mode will not propagate to newly created files/directories,
> it'll be determined by the umask of the creator.
> 

Luckily, if the user has a private group, their default umask will be 002,
which is exactly what you want. This is exactly the situation where Red
Hat's user private group scheme comes in useful!

Jonathan




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux