2.4.27. setfacl#

setfacl modifies filesystem access control lists for files and directories.

2.4.27.1. Common setfacl usage#

Give a specific user permission to read, write, and execute within a folder:

  • modifies ACL

  • alternative to chmod

setfacl -m u:username:rwx myfolder

Helpful options.

Option

Meaning

-m, –modify=acl

modify the current ACL(s) of file(s)

-M, –modify-file=file

read ACL entries to modify from file

-x, –remove=acl

remove entries from the ACL(s) of file(s)

-b, –remove-all

remove all extended ACL entries

-R, –recursive

recurse into subdirectories