Skip to content

chmod Calculator

Converts between octal, symbolic and checkbox permission views, including setuid and sticky bits.

A checkbox for every permission bit, with the octal, the `ls -l` string and the `chmod` argument updating together. It also applies a symbolic change like `u+x` to what you have, and shows what a umask would leave you with.

🔒 Runs entirely in your browserchmodpermissionslinuxcalculator

Permissions

A checkbox per permission bit.
WhoRead rWrite wExecute xOctal
OwnerThe user who owns the file.6
GroupMembers of the file’s group.4
Everyone elseEvery other account on the machine.4
SpecialThe fourth octal digit.0

chmod argument

u=rw,g=r,o=r

Apply a symbolic change

Result

744

As ls shows it

rwxr--r--

`chmod +x` is a change, not a value: what it produces depends on what was there first.

Through a umask

This mode becomes

644

A new file becomes

644

A new directory becomes

755

A umask removes bits from what a program asks for. A new file is requested as 666 and a new directory as 777, which is why the same umask gives 644 and 755.

What it looks like

-rw-r--r--  1 you  staff  4096  file.txt

A capital S or T in that string means the set-id or sticky bit is on while the execute bit beneath it is off — the bit has no effect, and it is nearly always a typo.

How to use it

  1. Tick the bits, or type the number

    Everything is bidirectional: type `755` and the boxes follow; tick a box and the octal and the `ls -l` string change with it.

  2. Say whether it is a directory

    It changes what the bits mean. On a directory, execute is permission to enter it and read is permission to list it — a directory with read but not execute is the confusing case the notes will flag.

  3. Try a symbolic change

    `chmod +x` is a change rather than a value: what it produces depends on what was there. Type `u+x,go-w` and see the result before you run it.

  4. Check what a umask leaves

    A umask removes bits from what a program asks for. The panel shows what a new file and a new directory would end up as under the umask you type.

Common questions

Why does the same umask give 644 and 755?

Because the requests differ, not the mask. A program creates a regular file asking for 666 and a directory asking for 777; `022` removes the group and other write bits from each, leaving 644 and 755. The mask never adds an execute bit that was not requested.

What does a capital S in `ls -l` mean?

That the set-id or sticky bit is on while the execute bit under it is off. The bit then has no effect at all, and it is nearly always a typo — a lowercase `s` is the working combination.

Is 777 ever right?

Almost never, and it is usually a diagnostic rather than a fix — it makes the permission error go away without telling you which bit was actually missing. On a shared machine it also means any account can rewrite the file.

Does this cover ACLs?

No. This is the classic Unix mode only. A `+` at the end of an `ls -l` line means there is a POSIX ACL on top, and that can grant or deny access these nine bits say nothing about — `getfacl` is where to look.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.