Chmod Calculator
Build Unix file permissions and read them as octal and symbolic notation.
| Group | Read | Write | Execute |
|---|---|---|---|
| owner | |||
| group | |||
| other |
ls -l shows it-rwxr-xr-xchmod 755 file.txtchmod -R 755 file.txt/Understanding chmod permissions
On Unix-like systems every file has three permission groups — owner, group, and other — each with read (4), write (2), and execute (1) bits. Summing the bits per group gives the familiar three-digit octal like 755 or 644, while the symbolic form rwxr-xr-x is what ls -l prints. It all computes in your browser.
A fourth leading digit carries the three special bits — setuid (4000), setgid (2000) and sticky (1000) — and they are usually what brings someone to a chmod calculator, because their symbolic form is not simply an extra character. Each one appears in the execute slot of the class it applies to, and its case tells you whether execute is also set:
| Octal | Symbolic | Meaning |
|---|---|---|
| 4755 | rwsr-xr-x | setuid, owner execute set — this is /usr/bin/passwd |
| 4655 | rwSr-xr-x | setuid but owner execute not set — so it does nothing |
| 2755 | rwxr-sr-x | setgid, group execute set |
| 1777 | rwxrwxrwt | sticky, other execute set — this is /tmp |
| 1776 | rwxrwxrwT | sticky but other execute not set |
That upper-case form is worth recognising: it is how ls -l tells you a setuid binary is not actually executable, which is nearly always a mistake — so this calculator says so rather than printing the mode without comment. The sticky bit is the opposite case: 1777 is the correctmode for a shared temp directory, because it lets everyone write while stopping anyone from deleting someone else's files, so no warning is shown for it. On a directory, setgid does something different again and genuinely useful: new files inside inherit the directory's group.
Related tools: the decimal to octal converter, the base converter, and the ASCII table.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Building a permission value from checkboxes rather than octal arithmetic.
- Reading an octal value as symbolic notation.
- Checking what a permission string actually allows.
- Producing a value for a deployment script.
- Understanding the setuid, setgid and sticky bits.
Frequently Asked Questions
- What do the three digits mean?
- Owner, group and others, each a sum of read (4), write (2) and execute (1). So 750 is full access for the owner, read and execute for the group, nothing for anyone else.
- What does execute mean on a directory?
- Permission to traverse it — to access something inside by name. A directory with read but not execute lets you list the names and open none of them, which is a genuinely useful distinction.
- What is the fourth leading digit?
- Setuid (4), setgid (2) and the sticky bit (1). Setuid runs a program as its owner, and the sticky bit on a shared directory such as `/tmp` stops users deleting each other's files.
- Why is 777 a bad idea?
- Because it lets any user on the system modify the file, including any compromised process. It is almost never the real fix — the actual problem is usually ownership, which `chown` solves without opening the file to everyone.
- How does umask interact with this?
- It removes permission bits from newly created files, so a default of 666 with a umask of 022 yields 644. That is why a new file is not executable and not group-writable unless you say so.
Common errors and gotchas
- Using 777, which grants everyone write access and is almost never what is wanted.
- Forgetting a directory needs execute permission to be entered at all.
- Applying a file's permissions recursively to directories, which then become unusable or unsafe.
- Overlooking that ownership matters as much as the mode.
- Assuming a permission fixes an access problem, when SELinux or an ACL may be the cause.