nwrangham
asked on
Setting permissions based on directory independent of owner
Anyone know how to set one set of default file permission on one file/directroy and another set of permissions on another ?
Set A might be:
- read/write owner, everyone else read
Set B might be:
- read/write developers, everyone else read
So that if any file/directory is created it will take on the permission of the section rather than the default permissions of the user. This is at the filesystem level and not exposed through Samba or any other mechanism.
Example: A web server is running on a debian box. Developers have local changes in their home directory which they wish to copy to the site served by the web server. When in their own home directory, a developer's files have "Set A" permissions. When a file is copied to the web directory, its permissions should change to those of "Set B".
Ideally this should require no manual altering of permissions, and should be taken care of by the filesystem to reduce the chance of human error by as much as possible. Is there a way to achieve this?
Set A might be:
- read/write owner, everyone else read
Set B might be:
- read/write developers, everyone else read
So that if any file/directory is created it will take on the permission of the section rather than the default permissions of the user. This is at the filesystem level and not exposed through Samba or any other mechanism.
Example: A web server is running on a debian box. Developers have local changes in their home directory which they wish to copy to the site served by the web server. When in their own home directory, a developer's files have "Set A" permissions. When a file is copied to the web directory, its permissions should change to those of "Set B".
Ideally this should require no manual altering of permissions, and should be taken care of by the filesystem to reduce the chance of human error by as much as possible. Is there a way to achieve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not entirely true.
Newer kernel has the feature called inotify, where You can plug Your own actions to be taken upon file change/creation.
Could be that, but I never use it.
Newer kernel has the feature called inotify, where You can plug Your own actions to be taken upon file change/creation.
Could be that, but I never use it.
ASKER
I was worried that would be the case
Thanks for your help