Linux Chmod Calculator & Permissions Cheat Sheet
Calculate octal, symbolic, and special file permissions in your browser. Generates exact chmod commands with instant two-way synchronization.
Current Permissions
Interactive Permission Matrix
| Permission | User (Owner) | Group | Others (World) |
|---|---|---|---|
| Read (r = 4) | |||
| Write (w = 2) | |||
| Execute (x = 1) |
Special Permission Bits (SUID, SGID, Sticky)
Generated Linux Commands
Common DevOps & SysAdmin Presets
How Linux Permissions Work: Math, Bits & Umask
1. The Basic Permission Values
Each user class (Owner, Group, Others) is represented by 3 binary bits summing up to an octal digit between 0 and 7:
- • 4 (r) = Read permission
- • 2 (w) = Write / modify permission
- • 1 (x) = Execute / traverse directory
Adding them produces the digit: 4 + 2 + 1 = 7 (rwx); 4 + 1 = 5 (r-x); 4 + 2 = 6 (rw-).
2. Special Permission Bits
The optional 4th leading octal digit controls process execution and file deletion behaviors:
- • 4000 (SUID): Runs executable with the privileges of the file owner (e.g.
/usr/bin/passwd). - • 2000 (SGID): On directories, files created inside inherit the directory’s group rather than the creator’s primary group.
- • 1000 (Sticky): On directories like
/tmp, prevents users from deleting or renaming files owned by others.
If you attempt to SSH using a private key with loose permissions (e.g. chmod 777 id_rsa or chmod 644 id_rsa), OpenSSH terminates with WARNING: UNPROTECTED PRIVATE KEY FILE! and ignores the key. SSH mandates that private keys must only be readable by their owner: chmod 600 ~/.ssh/id_rsa (or chmod 400).
Want to sharpen your Linux SysAdmin & SRE instincts?
Test your command-line reasoning, file systems knowledge, and troubleshooting intuition with Kernelry’s production scenario drills.