Have new files inherit their folder's extended ACLs
We are moving our web files from AFS to a local volume with the acl flag set. We use extended ACLs for our permissions so users can edit different parts of our websites. In AFS, when you create a new file it inherits its parent's permissions.
How do we make it so that when users create new files in their web directories, those files inherit the parent's facl? (Which includes www-data) If it helps, we run Gentoo Linux.
On Linux, many filesystems support posix acl.
If you have many directories and you want to apply the acls on subdirs
-R, --recursive
Apply operations to all files and directories recursively. This option cannot be mixed with ‘--restore’.
But if you want the acl are apply on files and directories on creation time, you need the defaults acls on directory
setfacl -d -m user:user01:rwx dir