Chmod Permissions Calculator & Command Builder
Interactive Linux permission calculator. Convert instantly between octal numbers (755, 644, 600) and symbolic notation (-rwxr-xr-x) with SUID, SGID, and Sticky bit support.
| Scope | Read (r = 4) | Write (w = 2) | Execute (x = 1) | Octal Sum |
|---|---|---|---|---|
User (Owner) File creator or owner | 7 | |||
Group Users in file's group | 5 | |||
Others (World) All other system users | 5 |
chmod 755 file.txtchmod u=rwx,g=rx,o=rx file.txtUser (Owner) has read, write, execute; Group has read, execute; Others (World) have read, execute.
Linux Permission Values & Octal Digit Math
Linux file permissions are represented as 3-bit binary numbers where each bit toggles Read (4), Write (2), or Execute (1).
| Octal Digit | Binary Representation | Symbolic | Permissions Granted | Calculation Formula |
|---|---|---|---|---|
| 7 | 111 | rwx | Read, Write, and Execute (Full Control) | 4 + 2 + 1 = 7 |
| 6 | 110 | rw- | Read and Write (No Execution) | 4 + 2 + 0 = 6 |
| 5 | 101 | r-x | Read and Execute (No Modification) | 4 + 0 + 1 = 5 |
| 4 | 100 | r-- | Read Only | 4 + 0 + 0 = 4 |
| 0 | 000 | --- | No Permissions (Completely Denied) | 0 + 0 + 0 = 0 |
Common Linux Server Security Permission Profiles
| Standard Use Case | Octal | Symbolic | Security Rationale |
|---|---|---|---|
| Web Root Directories | 755 | drwxr-xr-x | Allows Nginx/Apache to enter and traverse directories while preventing web visitors from modifying them. |
| Static Web Files & Images | 644 | -rw-r--r-- | Web visitors can read HTML/CSS/images, but execution is blocked, mitigating remote code execution exploits. |
| SSH Private Keys | 600 | -rw------- | OpenSSH strictly rejects private keys with looser permissions to prevent other users on the host from snooping. |
| Environment & Secrets (.env) | 600 or 400 | -rw------- | Prevents neighboring Linux user accounts and unprivileged daemons from reading database passwords. |
| World-Writable /tmp with Sticky | 1777 | drwxrwxrwt | Any process can write temporary cache files, but the sticky bit stops users from deleting each other's files. |
How to Calculate & Apply Linux Permissions in 4 Steps
Select Scope Bits
Check Read (4), Write (2), and Execute (1) boxes for User, Group, and Others or pick a pre-configured security preset.
Type or Read Octal
Notice the 3-digit octal number updating dynamically, or type an octal code directly to calculate the checkboxes.
Set Target & Flags
Enter your target file or directory path and toggle the -R recursive switch if you need to propagate permissions.
Copy Command
Copy the ready-to-run bash command directly into your terminal or deployment automation script.