1. All tools
  2. chmod calculator

What is the chmod number for these permissions?

Tick the read, write and execute boxes for the owner, the group and everyone else, and the octal mode, the symbolic string and a ready-to-paste chmod command appear immediately. You can also type an octal mode such as 644 or a symbolic mode such as rwxr-xr-x and the boxes follow. Nothing is sent anywhere.

Runs entirely in your browser · nothing is sent · no account

  1. Tick the permissions you want for the owner, the group and others.
  2. Or type an octal mode like 755, or a symbolic one like rw-r--r--.
  3. Copy the chmod command.

Who

Read (4)

Write (2)

Execute (1)

Octal755 Symbolicrwxr-xr-x chmodchmod 755 path

What this page can do

  • Build an octal mode from read, write and execute ticks for owner, group and others
  • Show the matching symbolic string, such as rwxr-xr-x
  • Write the chmod command ready to paste into a terminal
  • Include setuid, setgid and the sticky bit as the leading fourth digit
  • Read an octal mode or a symbolic string back into the tick boxes
  • Explain what each combination means in a sentence

When to use this page

  • You know you need 644 or 755 but not which boxes those are.
  • You have rw-r----- from ls -l and want the number to type.
  • You are writing a deploy script and want the chmod line to be right the first time.

When to use something else

  • You need to change permissions on a remote server — use this page for the number, then run chmod there.
  • You need to fix ownership, not permissions — that is chown, and a wrong owner is the usual cause of a permission problem.
  • You are dealing with ACLs, SELinux or a read-only mount, where the mode is not the whole story.

How it compares with other options

You can work this out by hand in a few seconds — 4, 2, 1, add, repeat — and many people do. The reason to use a page like this is the reverse direction, reading an unfamiliar mode such as 2750 or drwxrwsr-x, where the special bits are easy to get wrong, and the check on a symbolic string before it goes into a script. A command-line tool such as stat -c %a does the same job if you already have the file in front of you; this page works before the file exists.

Where your text goes

Nowhere. The whole calculation happens in your browser and the page has nothing to send it to, so the mode you are working on is not recorded anywhere. You can check it yourself: open your browser’s network panel while you tick the boxes — the page still loads its own code and any ads, but no request carries what you typed.

Questions about this tool

What do 755 and 644 actually mean?

Each digit is one group: owner, group, others. Read is 4, write is 2 and execute is 1, added together. So 755 is owner read-write-execute (4+2+1), group read-execute (4+1) and others read-execute (4+1) — the normal mode for a directory or a program. 644 is owner read-write, everyone else read-only, which is what most documents want.

When should a file be 777?

Almost never. 777 lets anyone on the machine rewrite the file, so on a shared or public server it is an invitation to replace your code with theirs. If a web server cannot write to a directory, fix the ownership or use a group and 775, rather than opening the mode to everybody. The correct answer to “I tried 777 and it worked” is usually “the owner is wrong”.

What are setuid, setgid and the sticky bit?

Setuid on a program makes it run as its owner rather than as whoever started it, which is how passwd can edit a protected file — and a real security risk if the program is flawed. Setgid does the same for the group, and on a directory it makes new files inherit the directory’s group. The sticky bit on a directory such as /tmp lets people delete only their own files. They show up as the leading fourth digit: 4755, 2755, 1755.

Why does a permission change seem to have no effect?

Usually because the missing permission is on a directory higher up. To read a file you need execute on every directory in its path, and to list a directory you need read on the directory itself. Root bypasses all of this, and a filesystem mounted with certain options or with ACLs can override the mode — check with ls -l and getfacl, and check the mount options, before assuming chmod failed.

Other tools you may need