! ! setfacl tests. ! ! Run these tests on a filesystem with ACL support. ! $ umask 027 $ touch g $ acl_mode g -rw-r----- $ setfacl -m m:- g $ acl_mode g -rw-------+ $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rw- group::r-- #effective:--- mask::--- other::--- $ setfacl -x m g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rw- group::r-- other::--- $ setfacl -m u:joe:rw g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rw- user:joe:rw- group::r-- mask::rw- other::--- $ setfacl -m u::rwx,g::r-x,o:- g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rwx user:joe:rw- group::r-x mask::rwx other::--- $ setfacl -m u::rwx,g::r-x,o:-,m:- g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rwx user:joe:rw- #effective:--- group::r-x #effective:--- mask::--- other::--- $ setfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rwx user:root:--- user:joe:rw- #effective:--- group::r-x #effective:--- mask::--- other::--- $ setfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rwx user:root:--- user:joe:rw- #effective:--- group::r-x #effective:--- mask::--- other::--- $ setfacl -m u::rwx,g::r-x,o:-,u:root:- g $ getfacl g # file: g # owner: @OWNER@ # group: @GROUP@ user::rwx user:root:--- user:joe:rw- group::r-x mask::rwx other::--- $ setfacl --test -x u: g setfacl: g: Malformed access ACL `user:root:---,user:joe:rw-,group::r-x,mask::rwx,other::---': Missing or wrong entry at entry 1 $ setfacl --test -x u:x setfacl: Option -x: Invalid argument near character 3 $ setfacl -m d:u:root:rwx g setfacl: g: Only directories can have default ACLs $ setfacl -x m g setfacl: g: Malformed access ACL `user::rwx,user:root:---,user:joe:rw-,group::r-x,other::---': Missing or wrong entry at entry 5 !setfacl --test -m d:u:joe:rwx setfacl !setfacl --test -n -m d:u:joe:rwx setfacl $ rm g ! ! Check if the mask is properly recalculated ! $ mkdir d $ setfacl --test -m u::rwx,u:@OWNER@:rwx,g::r-x,o::--- d d: u::rwx,u:@OWNER@:rwx,g::r-x,m::rwx,o::---,* $ setfacl --test -m u::rwx,u:@OWNER@:rwx,g::r-x,m::---,o::--- d d: u::rwx,u:@OWNER@:rwx,g::r-x,m::---,o::---,* $ setfacl --test -d -m u::rwx,u:@OWNER@:rwx,g::r-x,o::--- d d: *,d:u::rwx,d:u:@OWNER@:rwx,d:g::r-x,d:m::rwx,d:o::--- $ setfacl --test -d -m u::rwx,u:@OWNER@:rwx,g::r-x,m::---,o::--- d d: *,d:u::rwx,d:u:@OWNER@:rwx,d:g::r-x,d:m::---,d:o::--- $ rmdir d