getfacl
Permissions
Usage
getfacl [path]Prints the access control list, the extra per-user rights beyond owner, group and others; it is Linux with the acl package, while macOS shows its own kind of ACL with ls -le.
Common flags
| Flag | Meaning |
|---|---|
| -R | Walk a whole tree |
| -d | Show the default ACL that new files will inherit |
| -a | Show only the ACL of the file itself |
| --omit-header | Leave out the three comment lines |
| -e | Print the effective rights after the mask is applied |
Examples
getfacl report.pdfThe ACL plus the ordinary owner and group bits.
getfacl dir | setfacl --set-file=- other_dirCopies one ACL onto another directory.
ls -le report.pdfHow macOS shows its own kind of ACL instead.
Numeric and symbolic modes name the same thing: 755 and u=rwx,go=rx are the same permission.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does getfacl do?
Prints the access control list, the extra per-user rights beyond owner, group and others; it is Linux with the acl package, while macOS shows its own kind of ACL with ls -le.
Q. How do I type it?
getfacl [path] — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
5 are listed here; the full set is in man getfacl. This command sits under Permissions.
Related commands
man page: man getfacl