Pcornel
Security · Linux Security

Linux Permissions

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

Back to the Topic

Answer

Linux Permissions implement discretionary access control through owner/group identity, mode bits, directory traversal semantics, ACLs, umask and special setuid/setgid/sticky behavior across filesystems and mounts.

Remember

  • Readable directory ≠ file content readable without execute/traverse semantics.
  • Mode bits ≠ complete access decision when ACLs, capabilities, LSMs or mounts apply.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.

First checks

  • ls -l <path>; stat <path> — mode and owner
  • find / -xdev -perm -4000 -type f 2>/dev/null — SUID files
  • find / -xdev -type d -perm -0002 ! -perm -1000 2>/dev/null — world-writable dirs without sticky bit

Verify in this order

process UID/GID → mode/ACL check → allow/deny

Where it usually breaks

First mismatch in platform/workload identity → desired configuration → management/control plane → runtime enforcement → telemetry → workload/resource outcome; preserve identity/policy/pre-state before mutation.

Linux Security → Linux Permissions proof map

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure

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

Confirmation

Confirm action

Continue?