Setfacl utility tests. Run these tests on a filesystem with ACL support. $ mkdir d $ chown bin:bin d $ cd d $ su bin $ sg bin $ umask 027 $ touch g $ lfs ls -dl g | awk '{print $1}' > -rw-r----- $ lfs lsetfacl -m m:- g $ lfs ls -dl g | awk '{print $1}' > -rw-------+ $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rw- > group::r-- #effective:--- > mask::--- > other::--- > $ lfs lsetfacl -x m g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rw- > group::r-- > other::--- > $ lfs lsetfacl -m u:daemon:rw g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rw- > user:daemon:rw- > group::r-- > mask::rw- > other::--- > $ lfs lsetfacl -m u::rwx,g::r-x,o:- g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rwx > user:daemon:rw- > group::r-x > mask::rwx > other::--- > $ lfs lsetfacl -m u::rwx,g::r-x,o:-,m:- g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rwx > user:daemon:rw- #effective:--- > group::r-x #effective:--- > mask::--- > other::--- > $ lfs lsetfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rwx > user:root:--- > user:daemon:rw- #effective:--- > group::r-x #effective:--- > mask::--- > other::--- > $ lfs lsetfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rwx > user:root:--- > user:daemon:rw- #effective:--- > group::r-x #effective:--- > mask::--- > other::--- > $ lfs lsetfacl -m u::rwx,g::r-x,o:-,u:root:- g $ lfs lgetfacl g > # file: g > # owner: bin > # group: bin > user::rwx > user:root:--- > user:daemon:rw- > group::r-x > mask::rwx > other::--- > $ lfs lsetfacl --test -x u: g > setfacl: g: Malformed access ACL `user:root:---,user:daemon:rw-,group::r-x,mask::rwx,other::---': Missing or wrong entry at entry 1 $ lfs lsetfacl --test -x u:x > setfacl: Option -x: Invalid argument near character 3 $ lfs lsetfacl -m d:u:root:rwx g > setfacl: g: Only directories can have default ACLs $ lfs lsetfacl -x m g > setfacl: g: Malformed access ACL `user::rwx,user:root:---,user:daemon:rw-,group::r-x,other::---': Missing or wrong entry at entry 5 lfs lsetfacl --test -m d:u:daemon:rwx lfs lsetfacl lfs lsetfacl --test -n -m d:u:daemon:rwx lfs lsetfacl Check if the mask is properly recalculated $ mkdir d $ lfs lsetfacl --test -m u::rwx,u:bin:rwx,g::r-x,o::--- d > d: u::rwx,u:bin:rwx,g::r-x,m::rwx,o::---,* $ lfs lsetfacl --test -m u::rwx,u:bin:rwx,g::r-x,m::---,o::--- d > d: u::rwx,u:bin:rwx,g::r-x,m::---,o::---,* $ lfs lsetfacl --test -d -m u::rwx,u:bin:rwx,g::r-x,o::--- d > d: *,d:u::rwx,d:u:bin:rwx,d:g::r-x,d:m::rwx,d:o::--- $ lfs lsetfacl --test -d -m u::rwx,u:bin:rwx,g::r-x,m::---,o::--- d > d: *,d:u::rwx,d:u:bin:rwx,d:g::r-x,d:m::---,d:o::--- $ su $ cd .. $ rm -r d