Skip to main content
Tools

Chmod Calculator

Tick read, write and execute boxes to convert Unix permissions between octal (755, 644) and rwxr-xr-x, with ready-to-run chmod commands.

Common permissions

3 or 4 digits, e.g. 755, 0644 or 4755

e.g. rwxr-xr-x; -rw-r--r-- and drwxr-xr-x work too

Permissions

WhoRead (r)Write (w)Execute (x)
Owner (u)
Group (g)
Others (o)
Special

chmod commands

644: rw-r--r--

Octal form
chmod 644 file
Symbolic form
chmod u=rw,g=r,o=r file

How to use

  1. Pick a common permission such as 644 or 755, or tick read, write and execute for the owner, group and others in the table.
  2. Or type an octal mode (755, 0644, 4755) or paste the symbolic form from ls -l (-rw-r--r--); every other field follows.
  3. Add setuid, setgid or the sticky bit if you need them.
  4. Enter a file name and copy the octal or symbolic chmod command into your terminal.

FAQ

What do 755 and 644 mean?

The three digits are the permissions of the owner, the group and everyone else. Each digit adds up read (4), write (2) and execute (1). 755 is rwxr-xr-x: the owner can do everything, others can read and run it, which suits programs and directories. 644 is rw-r--r--, the usual mode for regular files.

What does execute mean for a directory?

For a directory, read (r) lets you list its contents and execute (x) lets you enter it and open the files inside. Directories therefore need x, as in 755 or 700; with r but no x you can see the names but cannot open the files.

What is the fourth digit in 4755, 2775 or 1777?

The leading digit holds the special bits: 4 is setuid (run as the owner), 2 is setgid (run as the group; on a directory, new files inherit its group) and 1 is sticky (in a directory, only a file’s owner can delete it, as in /tmp with 1777). ls -l shows s or t in the execute position, or an uppercase S or T when execute is not set.

Why is chmod 777 a bad idea?

777 lets any account on the machine change, delete or replace the file with something malicious. When a website hits a permission error, fix the owner with chown or use 755/644 instead of opening everything.

How does u=rwx,g=rx,o=r differ from the number?

Both set the same permissions. The symbolic form is easier to read and can also change just one part, such as chmod g+w to add group write; this tool produces the form with “=”, which sets everything exactly.

Does this work on Windows?

chmod is a command for Unix-like systems such as Linux and macOS. Windows uses ACLs, so you only need chmod in WSL, Git Bash or on a Linux server. All calculations run in your browser.

Keyboard shortcuts

/
Search tools (on a tool page, goes to the homepage search)
?
Show this help
Esc
Close a dialog
Ctrl / ⌘Enter
Run the tool's main action (where supported)

While you type in a text field, / and ? are typed as usual.