chmod Calculator — Octal, Symbolic & Checkbox Converter

Convert Unix permissions between octal (755), ls -l strings (rwxr-xr-x) and chmod clauses (u+x, o=r) — setuid/setgid/sticky included, in your browser.

read write execute
owner
group
others
special

$ chmod 755
$ chmod u=rwx,g=rx,o=rx file

Recursive? Add -R (chmod -R 755 dir/) — but read the warning about -R below first; it almost never does what you want.

Common presets

octalls -luse it for
400r--------read-only, owner only — freeze a file against edits
444r--r--r--read-only for everyone
600rw-------private files: SSH keys, .env, secrets
644rw-r--r--normal files: web pages, source, images
664rw-rw-r--files a team group co-edits
700rwx------private scripts and directories
755rwxr-xr-xscripts, programs and directories
1777rwxrwxrwtshared dirs like /tmp — all add, only owners delete

How to read any permission

Every file and directory carries three classes of permission — owner (u), group (g) and others (o) — and each class holds three bits: read (4), write (2), execute (1). An octal digit is just their sum: rwx = 4+2+1 = 7, r-x = 4+1 = 5, rw- = 6, r-- = 4. So 755 unpacks to rwxr-xr-x: the owner can do everything, everyone else can read and run it.

A leading fourth digit covers the special bits — 4 setuid, 2 setgid, 1 sticky — which is why chmod 4755 shows as rwsr-xr-x in ls -l. If you’re new to this, Unix permissions explained walks through it slowly; special bits covers setuid/setgid/sticky properly.

The three ways chmod accepts a mode

Octalchmod 644 file — absolute, fast, what you’ll type 95% of the time. Symbolic clauseschmod u+x file, chmod go-w dir, chmod o= file — relative edits that add (+), remove (-) or set exactly (=) permissions for chosen classes, comma-separable. The clause box above applies these to the current mode with real chmod semantics, including the umask rule: a bare +w won’t hand write access to group/others behind a typical umask. The ls -l stringrwxr-xr-x — is the readout form; paste it straight in, with or without the leading -/d file-type character.

Why -R is a trap

chmod -R 755 dir/ sets everything under dir/ — every file becomes executable, which is rarely intended and mildly embarrassing in a git diff. To give directories 755 but files 644, split the job:

find dir/ -type d -exec chmod 755 {} +
find dir/ -type f -exec chmod 644 {} +

or use capital X, which only sets execute on directories (and files already executable): chmod -R a+rX dir/. More traps like this live in common chmod mistakes.

Everything here runs in your browser — no upload, no server round-trip, works offline once loaded.

Frequently asked questions

What does chmod 755 actually mean?

It sets read, write and execute for the owner (rwx = 7), and read+execute for group and others (r-x = 5). It's the standard mode for scripts, programs and directories. The calculator above expands any octal into checkboxes and a plain-English description.

Is chmod 777 ever okay?

Almost never — it makes a file readable, writable and executable by every account on the system, so any compromised process or other user can rewrite it. On shared hosting it's a common way sites get defaced or backdoored. The right fix is usually 644 for files and 755 for directories, fixing the owner with chown instead. More in common chmod mistakes.

What are setuid, setgid and the sticky bit?

The three special bits in the first octal digit. setuid (4xxx) runs a program as its owner; setgid (2xxx) runs it as its group — or, on a directory, makes new files inherit the directory's group; sticky (1xxx) on a directory means only owners can delete their own entries, which is how /tmp works. They show up as s/S/t/T in ls -l. Full details in the special-bits guide.

What's the difference between chmod +x and chmod 755?

+x is a relative change — it adds execute to whatever is already there, for every class (filtered by your umask). 755 is absolute — it replaces the whole mode. chmod +x on a 600 file gives 711, not 755. The symbolic-clause box above applies relative changes onto the current mode exactly like the real command.

Why does the calculator mention a umask?

Because real chmod does. When you write a clause with no class letter — like +w or =rw — the change is filtered by your umask so masked bits aren't touched. On a typical umask of 022, chmod +w file adds write for the owner only, not for group and others. The calculator applies the same rule (umask 022) and says so, rather than pretending bare clauses hit everyone.

Does this page upload anything?

No. It's a static file — all conversion runs in JavaScript inside your browser tab. Load it, go offline, it still works. The privacy policy has the small print.

Why is 's' sometimes uppercase in ls -l output?

s vs S tells you whether the execute bit is also set: s = setuid/setgid and execute, S = setuid/setgid without execute (usually a mistake). Same for t vs T on the sticky bit. This calculator renders all four correctly — try setting mode 4600 to see rwS------.

Latest articles