A little help goes a long way. Find a tool/

Developer

Unix Permissions Calculator

Free chmod calculator. Convert Unix file permissions both ways — octal (755, 644, 4755) to symbolic (rwxr-xr-x) and back — with setuid, setgid and sticky bits explained. Runs in your browser.

YOUR WORKSPACEFree to use. No sign-up.
—
Enter a mode like 755 or rwxr-xr-x.

Deep dive guides

A LITTLE CONTEXT · 4 MIN READHow Unix File Permissions Work

How unix permissions calculator works

Every Unix file carries nine permission bits in three triples: what the owner can do, what the group can do, and what everyone else can do. Each triple is read (r), write (w) and execute (x), and each one is worth 4, 2 and 1. rwx is 4+2+1 = 7, r-x is 5, rw- is 6 — which is why the octal shorthand 755, 644 and 600 is everywhere: each digit is one role’s triple added up.

This tool converts in both directions. Type an octal mode like 755 and it produces the symbolic string rwxr-xr-x, the numeric value, and a per-role breakdown; paste a symbolic string like rw-r--r-- (an ls -l fragment with or without the leading file-type character also works) and it produces the octal digits. Special bits work too: a leading fourth digit (4755) or the letters s, S, t and T inside the triples encode setuid, setgid and sticky, and the tool reports which are active with a plain-English explanation.

Use it to decode a chmod command from a tutorial before you run it, to figure out why your web server refuses to read a file (it usually wanted 644 on files and 755 on directories), or to check a private key is properly locked down to 600. The conversion is pure arithmetic with no file system access, and it runs entirely in your browser.

Frequently asked questions

What does chmod 755 actually mean?
Owner: read, write and execute (7 = rwx). Group: read and execute (5 = r-x). Others: read and execute (5 = r-x). It is the standard mode for directories — the x bit lets you enter them — and for scripts and programs that everyone should be able to run but only the owner should edit.
What are the setuid, setgid and sticky bits?
They are three extra bits stored above the nine permission bits. Setuid makes a program run with the file owner’s privileges; setgid makes it run with the group’s (and makes new files in a directory inherit that directory’s group); sticky on a directory means only a file’s owner can delete it — /tmp is the classic example. In octal they are the leading fourth digit: 4755 is setuid, 2755 setgid, 1777 sticky.
Why do some listings show rws instead of rwx, or an uppercase S?
Lowercase s or t means the special bit is set and the execute bit is also set. Uppercase S or T means the special bit is set but execute is not — almost always a mistake, because the special bit does nothing without execute on that triple. The calculator reproduces exactly this: rwsr-xr-x is 4755, rwSr--r-- is 4644.
Why do permissions have four digits sometimes, like 0755?
The leading digit is the special-bit group: 4 setuid, 2 setgid, 1 sticky, 0 none. chmod accepts both three- and four-digit modes; 0755 and 755 are the same thing. Tools that create files (umask, install) often use the four-digit form to be explicit about the special bits.
Why does a directory need the execute bit to be usable?
On directories, x means traverse: the right to pass through the directory to reach its contents, and to access files inside it. A directory with r but no x lets you list the file names but not open them or stat them; with x but no r you can open files whose names you already know but cannot list. That is why the preset for web directories is 755, not 644.