OS Manuals

/usr/bin/setfacl

access control list utilities

From acl 2.4.0-r5 (os), captured 2026-11-05 by running setfacl --help (exit 0). permalink

setfacl 2.4.0 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
       setfacl [-P] --restore=file
  -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)
  -X, --remove-file=file  read ACL entries to remove from file
  -b, --remove-all        remove all extended ACL entries
  -k, --remove-default    remove the default ACL
      --set=acl           set the ACL of file(s), replacing the current ACL
      --set-file=file     read ACL entries to set from file
      --mask              do recalculate the effective rights mask
  -n, --no-mask           don't recalculate the effective rights mask
  -d, --default           operations apply to the default ACL
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P, --physical          physical walk, do not follow symbolic links
      --restore=file      restore ACLs (inverse of `getfacl -R')
      --test              test mode (ACLs are not modified)
  -v, --version           print version and exit
  -h, --help              this help text
Options (18)
OptionDescriptionSource
-m, --modify aclmodify the current ACL(s) of file(s)help
-M, --modify-file fileread ACL entries to modify from filehelp
-x, --remove aclremove entries from the ACL(s) of file(s)help
-X, --remove-file fileread ACL entries to remove from filehelp
-b, --remove-allRemove all extended ACL entries.help + man
-k, --remove-defaultRemove the Default ACL.help + man
--set aclset the ACL of file(s), replacing the current ACLhelp
--set-file fileread ACL entries to set from filehelp
--maskDo recalculate the effective rights mask, even if an ACL mask entry was explicitly given.help + man
-n, --no-maskDo not recalculate the effective rights mask.help + man
-d, --defaultAll operations apply to the Default ACL.help + man
-R, --recursiveApply operations to all files and directories recursively.help + man
-L, --logicalLogical walk, follow symbolic links.help + man
-P, --physicalPhysical walk, do not follow symbolic links.help + man
--restore fileRestore a permission backup created by getfacl -R' or similar.help + man
--testtest mode (ACLs are not modified)help + man
-v, --versionPrint the version of setfacl and exit.help + man
-h, --helpPrint help explaining the command line options.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.