ACL - File Access Control Lists (facl)

There are two dimensions to applying ACLs. One is how you apply them to existing files and folders, the other is applying them to future files and folders. This is the access and default ACLs, respectively.

sudo setfacl -m "g:rslsync:rwx,d:rslsync:rw" some_file
                  ^             ^
                  |             \----- The 'd' applies to future files by changing the default   
                  |
                  \---- The 'g' applies group acls to existing files

# Clear up any existing things
sudo setfacl --recursive --remove-all --remove-default Directory

# Set only the directories to 'x'
find Directory -type d -exec sudo setfacl --modify "g:rslsync:rwx" {} \;

# Set the default without 'x' so files will be non executable by default but directories will be
find Directory -type d -exec sudo setfacl --default --modify "g:rslsync:rw" {} \;

# Set all the files to 'rw'
find
Directory -type f -exec sudo setfacl --modify "g:rslsync:rw" {} \;



https://serverfault.com/questions/2736/how-does-one-get-setfacl-to-set-acl-permissions-recursively-on-linux
Comments