chmod Calculator | Convert Permission Numbers (755, 644, 600, 4755) to and From rwxr-xr-x and ls -l Notation, See What the Owner, Group and Others Can Do, Try Symbolic Modes Such as chmod u+x, go-w and a+X, Work Out New File and Directory Permissions From a umask (and Back), With Tables of setuid, setgid, the Sticky Bit and Common Permissions

The chmod Calculator answers questions such as “what does permission 755 mean?”, “what number is rwxr-xr-x?”, “what does 644 become after chmod +x?” and “with umask 022, what permissions do new files get?”. Type a number such as 755, 0644 or 4755, or notation you see in ls -l such as -rw-r--r-- or drwxrwxrwt, or tick read (r), write (w) and execute (x) for the owner (u), group (g) and others (o). It shows the number (3 and 4 digits), rwx, how ls -l displays it, two forms of the command (chmod 755 file and chmod u=rwx,g=rx,o=rx file) and who can do what for a file and for a directory, and warns about 777, files others can write, and settings unsuitable for SSH private keys. The symbolic-mode tab applies comma-separated expressions such as u+x, go-w, o=, g=u, a+X and u+s to a starting permission and shows each step, including how umask affects expressions that omit u, g, o or a. The umask tab gives the permissions of new files (from 666) and directories (from 777) for umask 022, 002, 027, 077 and more, and works out the umask from the directory permission you want. Includes tables of common permissions (755, 644, 600, 700, 400, 640, 775, 1777, 2775, 4755 and more) and where to use them, single digits and rwx, and setuid, setgid and the sticky bit.

Convert permission numbers and rwx

Enter a number such as 755 or ls -l notation such as rwxr-xr-x or -rw-r--r--, or tick and untick the boxes below.

Target

WhoRead (r)Write (w)Execute (x)Number
Owner (u)4217
Group (g)4215
Others (o)4215

Number (octal)

755

0755 in 4 digits

Symbolic (rwx)

rwxr-xr-x

u=rwx,g=rx,o=rx

As shown by ls -l

-rwxr-xr-x

The leading - means an ordinary file

Commands

$ chmod 755 file
$ chmod u=rwx,g=rx,o=rx file

Owner (u) 7

can read the contents, can change the contents, can run it as a program

Group (g) 5

can read the contents, can run it as a program

Others (o) 5

can read the contents, can run it as a program

Everything is calculated in your browser and nothing you enter is sent anywhere. Permissions work the same way on Linux, macOS and other UNIX-like systems. Access may also be restricted by other mechanisms such as ACLs (getfacl) or SELinux.

ABOUT

About chmod Calculator | Convert Permission Numbers (755, 644, 600, 4755) to and From rwxr-xr-x and ls -l Notation, See What the Owner, Group and Others Can Do, Try Symbolic Modes Such as chmod u+x, go-w and a+X, Work Out New File and Directory Permissions From a umask (and Back), With Tables of setuid, setgid, the Sticky Bit and Common Permissions

The chmod Calculator is a free tool that converts permission numbers (755, 644 and so on) to and from notation such as rwxr-xr-x, and shows what the owner, group and others can do along with chmod commands. It can also calculate the result of symbolic modes such as chmod u+x, and the permissions of new files from a umask.

How to use chmod Calculator | Convert Permission Numbers (755, 644, 600, 4755) to and From rwxr-xr-x and ls -l Notation, See What the Owner, Group and Others Can Do, Try Symbolic Modes Such as chmod u+x, go-w and a+X, Work Out New File and Directory Permissions From a umask (and Back), With Tables of setuid, setgid, the Sticky Bit and Common Permissions

  1. 1On “Number ↔ rwx”, type a number such as 755, or notation you see in ls -l such as -rw-r--r--
  2. 2Choose whether it is a file or a directory, and read what the owner, group and others can do and any warnings
  3. 3Tick and untick boxes to build the permission you want, then copy the number and the chmod command
  4. 4To see the result of an expression such as chmod u+x or go-w, enter the current permission and the expression on “Try chmod u+x and more”
  5. 5To see the permissions of newly created files, enter the umask on “umask calculator”

Great for

  • Checking what permission 755 or 644 means and who can do what
  • Turning rwxr-xr-x or drwxrwxrwt seen in ls -l into a number
  • Checking which number to set on CGI scripts, WordPress's wp-config.php or .htaccess on shared hosting or in an FTP client
  • Finding the right number when ssh says “UNPROTECTED PRIVATE KEY FILE!” for a private key or an AWS .pem
  • Checking the resulting number before running chmod +x, chmod go-w or chmod -R a+X
  • Seeing what new files and directories become under umask 022, 002 or 027

Good to know

  • A permission number has 3 digits for the owner, group and others, and each digit is the sum of read r = 4, write w = 2 and execute x = 1. 755 is rwxr-xr-x (the owner can do everything, the others can read and execute) and 644 is rw-r--r-- (the owner can read and write, the others can only read).
  • The meaning changes for directories: r lets you list the contents, w lets you create, delete and rename files inside, and x lets you enter it (cd) and open the files inside. Directories normally get r and x together, and on web servers 644 for files and 755 for directories is the standard.
  • A 4th leading digit holds the special bits: setuid = 4000, setgid = 2000 and the sticky bit = 1000. 4755 is shown as rwsr-xr-x and /tmp's 1777 as rwxrwxrwt. Without x, s and t are shown in capitals as S and T.
  • Symbolic modes such as chmod u+x, go-w and a=r add or remove r, w and x for u (owner), g (group), o (others) or a (all) with + (add), - (remove) and = (set exactly). chmod u+x on 644 gives 744, chmod go-w on 755 leaves 755 unchanged, and chmod go-w on 664 gives 644.
  • chmod +x without u, g, o or a does not change bits that are set in the umask. With umask 022, chmod +x on 644 gives 755, but chmod +w leaves 644 as it is instead of making it 666 (the owner already has w). Write a+w to give it to everyone.
  • A umask lists the bits removed from 666 for new files and 777 for new directories. umask 022 gives files 644 and directories 755, 002 gives 664 and 775, 027 gives 640 and 750, and 077 gives 600 and 700. It is not subtraction, so umask 033 still gives files 644, not 633.

Questions this tool answers

Use chmod Calculator | Convert Permission Numbers (755, 644, 600, 4755) to and From rwxr-xr-x and ls -l Notation, See What the Owner, Group and Others Can Do, Try Symbolic Modes Such as chmod u+x, go-w and a+X, Work Out New File and Directory Permissions From a umask (and Back), With Tables of setuid, setgid, the Sticky Bit and Common Permissions for searches like these:

  • chmod 755 meaning
  • chmod 644 meaning
  • convert rwxr-xr-x to number
  • difference between chmod 755 and 644
  • what number does chmod +x give
  • ssh private key permission 600
  • umask 022 new file permissions
  • sticky bit 1777 meaning
  • chmod 4755 setuid

FAQ

What is the difference between permission 755 and 644?
With 755 (rwxr-xr-x) the owner can read, write and execute, and the group and others can read and execute. With 644 (rw-r--r--) the owner can read and write, the others can only read, and nobody can execute. Use 755 for directories, shell scripts and CGI, and 644 for ordinary files such as HTML, images and config files.
What is rwxr-xr-x as a number?
Split it into groups of 3 characters and add r = 4, w = 2 and x = 1. rwx = 7, r-x = 5 and r-x = 5, so it is 755. rw-r--r-- is 644, rw------- is 600 and rwxrwxrwt is 1777. The first character in ls -l (- or d) is the file type and is not part of the number.
How does chmod +x change the number?
+x without u, g, o or a adds x for everyone (except bits removed by the umask). 644 becomes 755, 600 becomes 711 and 664 becomes 775. If only you need to run it, use chmod u+x, which turns 644 into 744.
What permission should an SSH private key have?
Set private keys (id_rsa, id_ed25519) and AWS .pem files to 600 or 400. If anyone else can read them, as with 644 or 640, ssh prints “UNPROTECTED PRIVATE KEY FILE!” and refuses to use the key. A good guide is 700 for the ~/.ssh directory and 600 for authorized_keys.
With umask 022, what permissions do new files get?
Files get 666 with the 022 bits removed, which is 644 (rw-r--r--), and directories get 777 with them removed, which is 755 (rwxr-xr-x). umask 002 gives 664 and 775, 027 gives 640 and 750, and 077 gives 600 and 700.
Why is permission 777 dangerous?
With 777 anyone can modify and execute the file, so other users on the same server, or an attacker exploiting a weakness in a web app, can change it. Even for directories that need to be writable, first check whether 755 or 775 is enough by making the web server's user the owner or group.

ARTICLES

Guides for chmod Calculator | Convert Permission Numbers (755, 644, 600, 4755) to and From rwxr-xr-x and ls -l Notation, See What the Owner, Group and Others Can Do, Try Symbolic Modes Such as chmod u+x, go-w and a+X, Work Out New File and Directory Permissions From a umask (and Back), With Tables of setuid, setgid, the Sticky Bit and Common Permissions