chmod Calculator (Linux File Permissions)
Linux file permissions look cryptic at first glance: 755, rwxr-xr-x, chmod u+x file — three different ways to say the same thing. This tool lets you toggle the nine permission bits (owner / group / other × read / write / execute) plus the special setuid / setgid / sticky bits, and see all representations side-by-side. Also runs in reverse — type an octal value and the checkboxes light up.
| Read (4) | Write (2) | Execute (1) | |
|---|---|---|---|
| Owner (u) | |||
| Group (g) | |||
| Other (o) |
Common permissions
| Octal | Symbolic | Use case |
|---|---|---|
755 | rwxr-xr-x | Executable / public directory (default for binaries) |
644 | rw-r--r-- | Regular file (default for non-executables) |
700 | rwx------ | Private executable / private home directory |
600 | rw------- | Private file (SSH keys, secrets) |
777 | rwxrwxrwx | World-writable — almost always wrong, security risk |
750 | rwxr-x--- | Executable, group-readable, no other access |
1777 | rwxrwxrwt | Sticky bit dir (/tmp) — anyone can write, only owner can delete their own files |
How to use the chmod Calculator (Linux File Permissions)
Click the checkboxes to toggle each permission. Owner = the file's user owner; Group = the file's group owner; Other = everyone else. Read (r) lets you view file contents or list a directory; Write (w) lets you modify; Execute (x) lets you run a binary or enter a directory.
The octal value updates live. To go in reverse, type any 3- or 4-digit octal in the "Or type octal" field — the checkboxes match. Octal digits are sums: read = 4, write = 2, execute = 1; so 7 = read + write + execute, 5 = read + execute, 6 = read + write.
About chmod Calculator (Linux File Permissions)
Unix file permissions encode nine bits across three classes (user / group / other) × three permission types (read / write / execute). These nine bits are conventionally displayed as three octal digits (each digit = three bits = sum of 4+2+1) or as a 9-character string of r/w/x letters.
Three additional bits exist in the high octal digit:
- setuid (4000) — when set on an executable, the program runs with the file owner's privileges instead of the calling user. Used by tools like
sudo,passwd,ping. Security-sensitive; the file owner is effectively a privilege boundary. - setgid (2000) — same idea but for group. On a directory, setgid means new files inherit the directory's group ownership (useful for shared project dirs).
- sticky (1000) — on a directory, only the file owner can delete their files (even if the directory is world-writable). Used on
/tmp.
The chmod command accepts both octal (chmod 755 file) and symbolic (chmod u+x file = add execute for user) forms. Symbolic is better for incremental changes ("add execute"); octal is better for setting absolute permissions ("set to 755").
For directories: r = list contents; w = create/delete files in it; x = enter / use as cwd / look up files inside. Note: you can have r without x on a directory and lose useful access (you can list names but not stat or open files).
Common use cases
- Setting SSH key permissions —
chmod 600 ~/.ssh/id_rsa(most SSH clients refuse to use keys with looser permissions). - Web server file deploys — typically
644for files,755for directories. - Sharing a project directory —
770+ setgid so team members can edit each other's files. - Reading mysterious chmod commands in shell scripts — quickly decode
chmod 2755(setgid + standard executable). - Debugging permission-denied errors — see exactly what bits are set vs what's needed.
Frequently asked questions
What does 4 + 2 + 1 mean?
Why is 777 dangerous?
What's the difference between chmod symbolic and octal?
u+x) adds/removes bits relative to current. Use symbolic when you want to preserve existing bits while changing one ("add execute"), octal when setting absolute state.Does this apply to macOS / BSD?
ls -le to see them).