Brad Felmey grabbed a keyboard and wrote:
>
> I have a certain directory tree that I'd like to ensure always has the
> same owner/group for the contents therein, regardless of who created or
> last modified those contents (let's disregard the security implications
> for this discussion). Something similar to how umask works for
> permissions, only for GID/UID. I can obviously have a script running
> that resets the permissions every n number of seconds, but this is a
> horrible kludge, and I'd like to have something a bit more graceful.
chmod u+s {directory}
chmod g+s {directory}
For a regular program or script, those would cause the program/script to
run with the effective ID of the user and group owning the file that the
program/script is in. However, for a directory, it tells the system to
create files in that directory with the same group and user settings as the
directory.
> Also, I'm having difficulty figuring out how to have different umask for
> different areas of the filesystem. Is this possible in Linux?
Not that I know of. umask is a per-user thing.
--Dave
--
David Guntner GEnie: Just say NO!
http://www.akaMail.com/pgpkey/davidg or key server
for PGP Public key
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com