Skip to content
QueenNexa

Free tool

chmod Calculator (Octal and Symbolic)

Convert Unix file permissions between octal like 755 and symbolic like rwxr-xr-x, apply symbolic changes, and copy the chmod command. Runs in your browser.

WhoRead (4)Write (2)Execute (1)
owner
group
others
Special bits

Runs entirely in your browser. Nothing you type or upload is sent to our servers.

How to use the chmod calculator

  1. Tick the permission boxes, type an octal number such as 755, or type nine letters such as rwxr-xr-x. The other two forms update at once.
  2. To adjust an existing mode, type a symbolic change such as u+x and press Apply.
  3. Copy the command and run it in your terminal.

Worked example

For 755: the owner digit 7 = 4+2+1 (read, write, execute), the group digit 5 = 4+1 (read, execute) and the others digit 5 = 4+1 (read, execute). The letters are therefore rwx, r-x, r-x, and the command for a file called deploy.sh is:

chmod 755 deploy.sh

Common values

OctalSymbolic
755rwxr-xr-x
644rw-r--r--
600rw-------
777rwxrwxrwx
4755rwsr-xr-x
2755rwxr-sr-x
1777rwxrwxrwt

Symbolic changes

Starting from nothing, u=rwx,go=rx gives 755. Starting from 644, u+x gives 744. Starting from 777, go-w gives 755. Each part needs u, g, o or a, an operator and r, w or x; special bits already set are left alone.

This calculator works from the bit values described above and is not a substitute for your system's own chmod manual. Generating passwords for the account that owns the file? Use the password generator. Need to compare two permission listings? Use Text Compare, or convert a config with YAML to JSON.

Frequently asked questions

How do I read a number like 755 or 644?

Each digit describes one group, in this order: owner, group, others. Add 4 for read, 2 for write and 1 for execute. So 7 is 4+2+1, meaning read, write and execute, 5 is 4+1, meaning read and execute, and 4 is read only. That makes 755 equal to rwxr-xr-x and 644 equal to rw-r--r--.

How do I convert rwxr-xr-x to a number?

Split the nine letters into three groups of three: rwx, r-x and r-x. Within each group, r counts 4, w counts 2, x counts 1, and a dash counts 0. The groups add up to 7, 5 and 5, so the number is 755. You can type the nine letters into the symbolic box and the octal field updates to match.

What does a fourth digit or an s or t mean here?

A fourth, leading digit holds three special bits: 4 is setuid, 2 is setgid and 1 is sticky, added together like the others. In the nine-letter form they replace an execute slot: s for setuid and setgid, t for sticky. A capital S or T means the special bit is on while the execute bit underneath it is off.

How do symbolic changes like u+x or go-w work?

Each part starts with who: u for owner, g for group, o for others or a for all. Then comes + to add, - to remove or = to set exactly, then the letters r, w and x. Starting from 644, u+x gives 744, and starting from 777, go-w gives 755. Separate several parts with commas, as in u=rwx,go=rx.

Why is my symbolic change rejected?

To keep results predictable, every part must start with u, g, o or a and use only r, w and x after the operator. Parts that leave out who, use s, t or X, or copy permissions from another group, such as g=u, are not supported. Set special bits with the checkboxes or the leading octal digit instead.

Does this tool change any files?

No. It only calculates the number, the letters and a command line you can copy. Nothing runs on your computer, and nothing you enter is uploaded or stored. You run the command yourself in your own terminal, so check the file name and the number before you do.

How is the command built, and what about file names with spaces?

The command is chmod, then the number, then the file name you enter. If the name contains anything other than letters, digits, dots, slashes, hyphens and underscores, the tool wraps it in single quotes so spaces and special characters are treated as plain text. Tick Recursive to add the -R flag to the command.

Link to this tool

Found it useful? Copy a link for your page, newsletter or documentation.

Get new tools and guides by email

Optional. The tool above works without signing up.

One email every Tuesday. Free, and you can unsubscribe in one click.

More free tools

Browse all developer tools or the full list of free tools.