Home inherit-parent-permissions
Post
Cancel

inherit-parent-permissions

Disk needs to be mounted with acl (ie. /dev/cmc_ftp/cmc_vol /usr/local/jail2 ext4 defaults,acl 0 0)

if required, remount the disk with the new options via;

mount -o remount /usr/locaL/jail2

check current settings on a directory via getfacl;

1
2
3
4
5
6
7
8
shell> getfacl SD
# file: SD
# owner: adstream
# group: sftpuser
# flags: -s-
user::rwx
group::rwx
other::r-x

change with setfacl;

1
2
3
4
5
shell>  setfacl --test -R -d -m g::rwX,o::rwX adstream
adstream: *,d:u::rwx,d:g::rwx,d:o::rwx
adstream/SD: *,d:u::rwx,d:g::rwx,d:o::rwx
adstream/HD: *,d:u::rwx,d:g::rwx,d:o::rwx
adstream/HD/testfile: *,*

–test will list the changes, rather than applying them

1
setfacl -R -d -m g::rwX,o::rwX adstream

This will -Rursively apply setfacl to the adstream directory, -modifying the -default ACLs – those that will be applied to newly created items. (Uppercase X means only directories will receive the +x bit.)

(If needed, you can add a u:someuser:rwX or g:someuser:rwX – preferably a group – to the ACLs.)

removing file ACL’s

1
setfacl -bn Inbound
This post is licensed under CC BY 4.0 by the author.