LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Simple Problem Looking for Simple Solution (https://www.linuxquestions.org/questions/linux-newbie-8/simple-problem-looking-for-simple-solution-921290/)

mccartjd 12-30-2011 06:44 PM

Simple Problem Looking for Simple Solution
 
I have about 50 users collaberating there work in one central folder. The folder permissions are 770 and when users post there files other users can not modify any of the files created by other users. I have tried umask 007 but that only works for the current user as he/she is logged in, but when they logoff and login again there umask settings do not hold for new files. All the users are a member of Primary Group (Jedi or GUID 502). Is there a simple command I can type so when users place files in the folder (Empire) that the files inherit the permissions of the folder?

Here are the facts:
Operating System RHEL 5
All users member of the Primary Group Jedi or GUID 502
Path=/data/Empire
Objective: All users of group Jedi have read and write to all files (existing and future additions) located in folder Jedi. Users not required to do anything special and files automatically inherit permissions from folder.
A million thanks, Johnny Mac

btmiller 12-30-2011 08:02 PM

You can slap the setgid bit on the directory, which will make all newly inherited files inherit the group ownership of the parent directory, but I know of no way to make them inherit the permission bits. I'd suggest adding the umask 007 command to your /etc/profile, so all users get that umask automatically on login. However, this is not foolproof (users can reset their umask). You might want to just write a little shell script that sets all the file permissions correctly, and then run it from cron say every 5 minutes. It's not exactly elegant, but it will do what you want.


All times are GMT -5. The time now is 02:04 AM.