Unix modes encode read, write, and execute bits for owner, group, and other. A leading octal digit carries set-user-ID, set-group-ID, and sticky bits.
A mode is not the whole access decision. Ownership, directory traversal, umask, ACLs, capabilities, mount options, and platform policy can change effective access.
World-writable and privileged-execution bits deserve review but are not automatically vulnerabilities. Context distinguishes a shared sticky directory from a writable executable.
Edge cases worth knowing
- Special execute notation
- Symbolic s/S and t/T preserve whether the corresponding execute bit is also set.
- Three versus four octal digits
- 755 and 0755 describe the same permissions; 4755 additionally sets set-user-ID.
- Owner has no access
- A valid mode can deny the owner while granting group or other access; tryb surfaces this unusual configuration.
Common mistakes
- Using chmod 777 instead of correcting ownership or deployment policy.
- Ignoring special bits because only the final three octal digits were reviewed.
- Assuming the displayed mode includes ACLs, capabilities, or mount restrictions.
- Confusing an octal mode with an ordinary decimal number.