Created
May 29, 2015 09:37
-
-
Save noppolp/681b67f98b58064012e3 to your computer and use it in GitHub Desktop.
Apply default permission to directory (From http://unix.stackexchange.com/questions/1314/how-to-set-default-file-permissions-for-all-folders-files-in-a-directory)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod g+s <directory> //set gid | |
setfacl -d -m g::rwx /<directory> //set group to rwx default | |
setfacl -d -m o::rx /<directory> //set other | |
Next we can verify: | |
getfacl /<directory> | |
Output: | |
# file: ../<directory>/ | |
# owner: <user> | |
# group: media | |
# flags: -s- | |
user::rwx | |
group::rwx | |
other::r-x | |
default:user::rwx | |
default:group::rwx | |
default:other::r-x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment