How to make new file permission inherit from the parent directory?
Problem
I have a directory called . Then I am running a script under the user id 'robot'. robot writes to the directory and update files inside. The idea is is open for both me and robot to update. So I setup the permission and owner group like this where both me and robot belongs to the 'robot-grp'. I change the permission and the owner group recursively like the parent directory. I regularly upload new files into the directory using . Unfortunately, new files uploaded does not inherit the parent directory's permission as I hope. Instead it looks like this When robot tries to update , it fails due to lack of file permission. I'm not sure if setting umask helps. In anycase the new files does not really follow it. I'm often confounded by Unix file permission. Do I even have a right plan? I'm using Debian lenny.
Error Output
drwxrwxr-x 2 me robot-grp 4096 Jun 11 20:50 data
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How to make new file permission inherit from the parent directory?
You do not want to change your system's default umask, that is a security risk. The sticky bit option will work to some extent, but using ACL's is the best way to go. This is easier than you think. The problem with basic ACL's is that they are not recursive by default. If you set an ACL on a directory, only the files inside that directory inherit the ACL. If you create a subdirectory, it does not get the parent ACL unless the ACL is set to recurse. First, make sure ACLs are enabled for the volu…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix