linux/setfacl - Set all current/future files/directories in parent directory to 775 with specified owner/group
Solution 1:
I actually found something that so far does what I asked for, sharing here so anyone who runs into this issue can try out this solution:
sudo setfacl -Rdm g:groupnamehere:rwx /base/path/members/
sudo setfacl -Rm g:groupnamehere:rwx /base/path/members/
R is recursive, which means everything under that directory will have the rule applied to it.
d is default, which means for all future items created under that directory, have these rules apply by default.
m is needed to add/modify rules.
The first command, is for new items (hence the d), the second command, is for old/existing items under the folder. Hope this helps someone out as this stuff is a bit complicated and not very intuitive.
Solution 2:
To go with your accepted answer ...
You can combine those commands together as:
sudo setfacl -Rm d:g:groupnamehere:rwx,g:groupnamehere:rwx /base/path/members/
Solution 3:
setfacl on linux has the -d
and -k
options for manipulating default permissions which are probably what you are looking for (see man for more info).