Skip to content
ZeroServer.tools

Chmod Calculator

Build Unix file permissions and read them as octal and symbolic notation.

Permissions 755, rwxr-xr-x
Common modes
GroupReadWriteExecute
owner
group
other
Special bits (the leading octal digit)
Octal
755
Symbolic
rwxr-xr-x
As ls -l shows it-rwxr-xr-x
Apply to Single File
chmod 755 file.txt
Apply Recursively (Directories)
chmod -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:

How special bits appear in symbolic notation
OctalSymbolicMeaning
4755rwsr-xr-xsetuid, owner execute set — this is /usr/bin/passwd
4655rwSr-xr-xsetuid but owner execute not set — so it does nothing
2755rwxr-sr-xsetgid, group execute set
1777rwxrwxrwtsticky, other execute set — this is /tmp
1776rwxrwxrwTsticky 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.

Related Developer Utilities tools

Private & free — this tool runs entirely in your browser.

IndieKitShip your Next.js startup in days.affiliate