Pcornel
Linux · Permissions & Ownership

ACL (Access Control List)

Cheat sheet · https://pcornel.dk/topic.php?topic=2711

Back to the Topic

Answer

POSIX ACLs (access control lists) add permissions for specific extra users and groups beyond owner/group/others, and default ACLs make new files in a directory inherit them.

Remember

ls -l shows + after the mode when an ACL exists. The ACL mask limits all named entries and the group — chmod changes the mask and can silently reduce ACL access. Copy and backup tools must preserve ACLs (cp -a, rsync -A, tar --acls).

First checks

  • getfacl <path> — ACL entries and effective rights
  • ls -l <path> — owner, group and mode
  • stat -c '%A %a %U:%G' <path> — symbolic and numeric mode with owner
  • namei -l <path> — permissions of every directory on the path
  • id <user> — user's groups

Verify in this order

mode bits → ACL entries checked (owner, named users, group and named groups limited by mask, others) → access granted or denied

Where it usually breaks

First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2711

Confirmation

Confirm action

Continue?