Chmod Calculator

Translate 755 ↔ rwxr-xr-x ↔ u=rwx,g=rx,o=rx instantly.

Runs in your browser Instant No sign-up
Mode
Permissions

Paste, type or drop a file — output appears as you type.

Waiting for input
Processed locally · nothing is uploadedProcessed locally

How to use it

Enter a mode in any common format and the calculator shows all the equivalent forms:

Octal      2775
Symbolic   rwxrwsr-x   (ls -l: -rwxrwsr-x)
Command    chmod 2775 file
Clauses    chmod u=rwx,g=rwxs,o=rx file

Permissions
  owner   7  read  write  execute
  group   7  read  write  execute
  others  5  read         execute

Special    setgid

Both commands at the top set the same permissions; use whichever style your team prefers. Clauses such as u=rw,go=r on their own start from an empty mode, so they produce 644. To change an existing mode, put it first: 644 u+x gives 744.

How the numbers work

Each permission is a bit: read is 4, write is 2 and execute is 1. Add them to get a digit for the owner, the group and others. On directories, read lets you list the contents, write lets you create and delete files, and execute lets you enter the directory.

Mode Symbolic Typical use
644 rw-r–r– Regular files, web content
600 rw—–– Private files such as SSH keys and .env
755 rwxr-xr-x Directories, scripts and binaries
700 rwx—— Private directories such as ~/.ssh
775 rwxrwxr-x Shared project directories for a group
1777 rwxrwxrwt Shared temporary directories like /tmp

Symbolic clauses

The clause syntax used by chmod names who (u for the owner, g for the group, o for others, a for all), an operator and the permissions. = sets exactly those permissions, + adds them and - removes them. Clauses are separated by commas, so u=rwx,g=rx,o= gives 750. Clauses alone start from an empty mode, so to model chmod g+w file on a real file, give its current mode first — for example 644 g+w gives 664. On a real system + and - keep every other bit as it was, so check the current mode with ls -l first.

Warnings

The calculator flags two common mistakes:

  • World-writable modes such as 777: Others can write: anyone on the system can modify this file. This is rarely the right fix for a permission error. Find out which user needs access and grant it to that user or group instead.
  • Special bits without execute, which show as S or T: A special bit is set without execute (shown as S/T), which is usually a mistake.

An invalid entry such as 999 returns the list of accepted formats instead of a guess.

Look-up pages

The modes that people look up most have their own pages that say when to use each one and when not to: 755, 644, 777, 600, 700, 664, 775, 400.

Frequently asked questions

What do the three digits in 755 mean?

They are the permissions for the owner, the group and everyone else, in that order. Each digit adds read (4), write (2) and execute (1), so 7 is read, write and execute, 5 is read and execute, and 4 is read only.

What is the fourth digit in 2775 or 4755?

The special bits: 4 is setuid, 2 is setgid and 1 is the sticky bit, added together when more than one is set. setgid on a directory makes new files inherit the directory's group, and the sticky bit on a shared directory stops users from deleting each other's files.

What does an uppercase S or T mean?

A special bit is set but the matching execute bit is not. For example, 4644 shows rwSr--r--. That combination is almost never intended, so the tool shows a warning.

Which formats can I enter?

Octal modes with three or four digits (644, 0755, 1777), a nine-character symbolic string with an optional leading type character as shown by ls -l (-rwxr-xr-x), or chmod clauses such as u=rwx,g=rx,o= and a+x.

Does this change files on my computer?

No. It only calculates and explains modes in your browser. Copy the chmod command it prints and run it yourself.

Last updated