Link to home
Start Free TrialLog in
Avatar of nwrangham
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?

ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nwrangham
nwrangham

ASKER

ok,

I was worried that would be the case

Thanks for your help
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.