Chmod Calculator — Octal ↔ Symbolic + Linux Permission Visualizer
Convert Linux/Unix file permissions across 3 forms: octal (e.g. 755), symbolic (rwxr-xr-x), and an interactive Owner/Group/Other × Read/Write/Execute tick table. Supports setuid, setgid, sticky bit. 8 common presets (644, 755, 600, 1777, ...).
| Read (r=4) | Write (w=2) | Execute (x=1) | Special | |
|---|---|---|---|---|
| Owner (u) | ||||
| Group (g) | ||||
| Other (o) |
chmod command
chmod 755 <file>Common presets
Why use this tool
Tick checkboxes instead of remembering 4r+2w+1x math. All three views stay in sync in real time.
755 (executable), 644 (regular file), 600 (.env), 700 (private), 777 (avoid in prod), 775 (group write), 1777 (sticky /tmp), 440 (read-only).
setuid (4xxx), setgid (2xxx), sticky (1xxx) — important for /tmp, shared folders, escalation binaries (sudo, passwd).
How to use
- 1Type octal (755) or symbolic (rwxr-xr-x), or click the checkboxes.
- 2All three stay in sync — editing one updates the others.
- 3Click a preset 755/644/600/... for a quick load.
- 4Copy the generated chmod command: 'chmod 755 <file>'.
Linux file permissions — done right
Linux file permissions have 9 primary bits + 3 special bits: 3 bits × 3 groups (Owner / Group / Other) × 3 perms (Read=4 / Write=2 / Execute=1) + setuid (4) + setgid (2) + sticky (1). Octal 755 means: Owner read+write+execute (4+2+1=7), Group + Other read+execute (4+1=5). Symbolic 'rwxr-xr-x' spells each bit.
Most common: 755 for executables + public directories (web server), 644 for regular text files, 600 for sensitive files (.env, ~/.ssh/id_rsa, ~/.aws/credentials), 700 for private directories. 777 should NOT be used in production — anyone can write, a security hole. If an app demands 777, dig deeper into what permissions it actually needs.
Special bits, under-used: setuid (chmod 4xxx) runs a binary with the owner's privileges — used for /usr/bin/sudo, /usr/bin/passwd. setgid on a directory — new files inherit the dir's group instead of the user's (good for collab). Sticky bit on /tmp — anyone can write but only the owner can delete their own files (prevents other users from deleting yours).
Full chmod usage: 'chmod 755 file.sh' (octal absolute), 'chmod u+x file.sh' (symbolic, add execute for owner), 'chmod -R 755 dir' (recursive). chown changes owner, chgrp changes group. Always 'ls -la' after chmod to confirm — a typo can lock you out.
- ✓Octal ↔ Symbolic bidirectional sync
- ✓Interactive 3×3 checkbox table
- ✓Setuid / Setgid / Sticky bit
- ✓8 common presets with explanations
- ✓Auto-generated chmod command
- ✓Recursive option explained
- ✓100% client-side
FAQ
Why 1777 instead of 777 for /tmp?
1xxx is the sticky bit. On a directory, sticky means: anyone can write new files in, but only the file's owner (or root) can delete it. Crucial for /tmp so user A can't delete user B's files.
Setuid + a shell script — does it work?
On modern Linux, NO. The kernel ignores the setuid bit on bash scripts for security (TOCTOU race exploits). Setuid only works on compiled binaries. For scripts needing elevated permissions → use sudo + sudoers config.
744 vs 755 on a directory — what changes?
Directories need the execute bit to cd / list contents. 744 on a directory → other users can't cd in. 755 allows cd + ls. For files, 644 and 744 both work; the execute bit only matters when the file is meant to run.
How do I check the current permissions of a file?
Use 'ls -la file' or 'stat file'. Output 'drwxr-xr-x' means: d=directory, rwx owner, r-x group, r-x other → 755.