Pcornel
Linux · Permissions & Ownership

Symbolic Permissions

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

Back to the Topic

Answer

Symbolic permissions change bits by class and operator: chmod u+x, g-w, o=r, a+r (u user, g group, o others, a all; + add, - remove, = set exactly).

Remember

chmod +x script adds execute for all classes allowed by umask. Capital X (chmod -R a+X) adds execute only to directories and files already executable — handy for trees.

First checks

  • 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

class and operator chosen → only those bits change → other bits kept

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=2707

Confirmation

Confirm action

Continue?