Chmod Calculator
Toggle read, write and execute for owner, group and others — the octal code, symbolic notation and chmod command update instantly.
| Read | Write | Execute | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Special permissions (setuid, setgid, sticky bit)
Tap to copy
Tap to copy
chmod 777 gives everyone full read, write and execute access — avoid this on shared or production systems.
Reading and building Unix file permissions
Every file and directory on Linux, macOS and other Unix-like systems carries three permission classes — owner, group and others — and three permission types per class — read, write and execute. That's nine yes/no switches, which is exactly what the checkbox grid above represents. This chmod calculator keeps the checkboxes, the three-digit octal code (like 755) and the nine-character symbolic string (like rwxr-xr-x) permanently in sync, so you can edit whichever format you're most comfortable with and read off the rest.
How the octal number is built
Each permission type has a fixed value: read = 4, write = 2, execute = 1. Add up the values that are switched on for a class to get that class's digit, then read owner-group-other left to right:
rwx= 4 + 2 + 1 = 7 (full access)rw-= 4 + 2 = 6 (read and write, no execute)r-x= 4 + 1 = 5 (read and execute, no write)r--= 4 = 4 (read only)---= 0 = 0 (no access)
Example — chmod 754. Owner = 7 (rwx, full control), group = 5 (r-x, read and run), others = 4 (r--, read only). Symbolic form: rwxr-xr--. This is a good fit for a script the whole team can run and inspect, but only you can edit.
Special permission bits: setuid, setgid, sticky
A fourth, leading octal digit controls three special bits, each worth 4, 2 or 1 and summed the same way as the main three digits:
- Setuid (4) — an executable runs with the file owner's privileges rather than the invoking user's. Shown as a lowercase
sin the owner's execute slot (or uppercaseSif the owner's execute bit itself is off)./usr/bin/passwdis the textbook example — it needs root privileges to edit/etc/shadowno matter who runs it. - Setgid (2) — the same idea for the group; on a directory it also makes every new file created inside automatically belong to that directory's group instead of the creator's default group. Shown as
s/Sin the group's execute slot. - Sticky bit (1) — on a shared, world-writable directory (classically
/tmp), it stops anyone but a file's owner (or root) from deleting or renaming it, even though the directory allows writes from everyone. Shown ast/Tin the others' execute slot.
Example — chmod 4755. Leading digit 4 = setuid, body 755 = rwxr-xr-x. Symbolic form: rwsr-xr-x — note the lowercase s replacing the owner's x.
Common permission recipes
| Octal | Symbolic | Typical use |
|---|---|---|
| 755 | rwxr-xr-x | Scripts, binaries, directories anyone can use |
| 644 | rw-r--r-- | Regular files: documents, configs, images |
| 700 | rwx------ | Private directory or script, owner only |
| 600 | rw------- | Private file — SSH private keys, secrets |
| 750 | rwxr-x--- | Group-readable directory, no outside access |
| 777 | rwxrwxrwx | Full access for everyone — avoid, see below |
Why chmod 777 is almost always the wrong answer
When a "permission denied" error shows up, running chmod 777 makes the error disappear because it grants read, write and execute to owner, group and every other account on the system. That's also exactly the problem: on a shared host or a public web server, any other user, process or compromised script can now overwrite, replace or execute that file. Investigate the actual mismatch instead — a wrong owner (chown), a wrong group, or simply needing 755/644 rather than 777 — and use this calculator to work out the minimum permission that actually fixes it.
Sources & further reading
Frequently asked questions
What does chmod 755 mean?
chmod 755 sets read, write and execute (7 = rwx) for the file's owner, and read plus execute (5 = r-x) for the group and everyone else. In symbolic notation that's rwxr-xr-x. It's the standard permission for scripts, compiled programs and directories you want anyone to be able to run or open, while only the owner can edit or delete the contents.
What's the difference between chmod 644 and chmod 755?
chmod 644 (rw-r--r--) gives the owner read and write access but no execute bit for anyone, which is correct for regular files like text documents, images or config files that are never run directly. chmod 755 (rwxr-xr-x) adds the execute bit for everyone, which is required for shell scripts, compiled binaries and directories — without execute permission a directory can't even be entered (cd'd into) or listed properly.
Why is chmod 777 considered dangerous?
chmod 777 (rwxrwxrwx) gives every user on the system — owner, group and everyone else — full read, write and execute access. On a shared server or anything internet-facing this means any other account, process or attacker with file access could modify, replace or execute the file, which is a common root cause of web shell uploads and privilege escalation. It's almost always the wrong fix for a "permission denied" error; a narrower mode like 755 or 644, or a group/owner change, is usually the real solution.
What are setuid, setgid, and the sticky bit?
These are special permission bits shown as a fourth leading octal digit (e.g. 4755) or as an s/t in the symbolic string. Setuid (4, shown as s in the owner's execute slot) makes a program run with the file owner's privileges instead of the user who launched it — classic examples are /usr/bin/passwd. Setgid (2, s in the group slot) does the same for the group, and on a directory makes new files inherit that directory's group. The sticky bit (1, t in the others' execute slot) on a shared directory like /tmp stops users from deleting or renaming files they don't own, even if the directory itself is writable by everyone.
Is my file name or permission data sent to a server?
No. This chmod calculator runs entirely in your browser — the permissions you toggle, the octal or symbolic values you type, and any filename you enter for the command preview never leave your device. Nothing is uploaded, logged or stored on a server, and your last permission setting is only kept in your own browser's local storage so it's there next time you open the page.