Default Permissions and Sharing with Ubuntu 10.04
Hi,
I'm trying to make a directory ('/home/sales/') that every user in a specified group ('sales') can modify without restraint, but anyone outside of that group can only read. I've set up the directory to have the permissions 775, but any files created are being created with permissions 755! I've tried setting umask to 002, and still no use. Can anyone give me any help? |
I use a workaround for a similar problem.
crontab this for every minute, chmod -R 775 /home/sales/ I would love to know if there is a more elegant way of doing this |
I thought of that too, but to be honest I'm really trying to avoid that
Thanks for the help though |
Is there really no one that can help me?
Can't I change a setting somewhere? Or write a new script somewhere? Something? |
The umask 002 should be working (assuming you're not doing anything daft like trying to use permissions on a filesystem type like FAT that doesn't support them).
What do you see if you do a Code:
cd /home/sales If that works as expected, then it must be down to how the files are being created. By the way, if you haven't already then you probably want to do a chown root:sales /home/sales chmod g+s /home/sales in order to enforce the setting of the correct group on all new files/directories created under that directory. |
(I'm on a different computer)
I think that umask is working. But it's not for my computer, and the user who owns it can't use the terminal, nor is it really an option to teach them. Is there a way to get it to do this automatically? |
Not reliably no. With the exception of the set-group-id on directories, the UNIX permissions system doesn't do inheritance in the same way that the NTFS permission system does. The user or program creating the file is responsible for setting the permissions on it appropriately.
You might want to read up on POSIX ACLs (man 5 ACL), but IMO they're a pain to manage and more trouble than they're worth. The cron solution already suggested is probably your easiest option. |
All times are GMT -5. The time now is 01:08 PM. |