Commands
bash
setfacl -m u:alice:rw file # grant alice rw (-m = modify)
setfacl -m g:devs:rx dir # grant group devs rx
setfacl -m u:alice:rw,g:devs:r f # several entries at once
setfacl -x u:alice file # remove alice's ACL entry
setfacl -b file # remove ALL ACL entries
setfacl -R -m u:alice:rX dir # recursive (X = x only for dirs/executables)
setfacl --restore=acl.bak # restore from getfacl -R
# default ACL — inheritance for NEW files in a directory:
setfacl -d -m u:alice:rw dir # new files inside will get rw for alice
setfacl -k dir # remove the default ACL