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

Re: Forcing file/directory properties



Anne Wilson wrote:
> I know there is a way to force files to take on the properties/permissions of 
> the directory in which it lives, but I can't remember how to do it, and can't 
> find my notes.  I presume it's done with chmod, but the man page for chmod is 
> totally opaque to me.

Not only is it obscure, it doesn't even *mention* the use on
directories.

Any directory with the setgid bit set (e.g. by chmod 2775) will have any
files created in it automatically take the directory's group ID. This is
useful for "project" directories -- you create a suitable group for the
project, chgrp and chmod it appropriately, and anything anyone creates
in there will be owned by the group.

This doesn't work for the setuid bit, and as far as I know there's no
way to enforce permissions on a per-directory basis.

See the traditional Red Hat explanation of the "user private group"
scheme that Fedora uses:
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/ref-guide/s1-users-groups-private-groups.html

Hope this helps,

James.

-- 
E-mail:     james@ | ... a sign carefully conveying in pictograms the fact
aprilcottage.co.uk | that you should not leave wheelchairs on a certain river
                   | bank as they would roll down the hill and the crocs would
                   | eat the passenger.                                -- Skud


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