Hi, Linux gives you part of the functionality you want via the 'setgid' flag on the directory:
"[...] a file's permissions have three special components, which affect only executable files (programs) and, on some systems, directories: 1. set the process's effective user ID to that of the file upon execution (called the "setuid bit"). No effect on directories. 2. set the process's effective group ID to that of the file upon execution (called the "setgid bit"). For directories on some systems, put files created in the directory into the same group as the directory, no matter what group the user who creates them is in. 3. save the program's text image on the swap device so it will load more quickly when run (called the "sticky bit"). For directories on some systems, prevent users from removing or renaming a file in a directory unless they own the file or the directory; this is called the "restriction deletion flag" for the directory." A quick check verifies that Linux (2.4.13 at least) implements the semantics in '2' above. Rony -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Brad Felmey Sent: Wednesday, November 14, 2001 6:47 PM To: [EMAIL PROTECTED] Subject: [expert] Forcing UID/GID for certain directories/trees? Hello, 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. Also, I'm having difficulty figuring out how to have different umask for different areas of the filesystem. Is this possible in Linux? Thanks for any and all replies. -- Brad Felmey
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com