Tools / Chmod Calculator

Chmod Calculator.

Convert Unix file permissions between octal (755), symbolic (rwxr-xr-x) and chmod clauses like u+x.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Mode
Permissions

About Chmod Calculator

Chmod Calculator translates Unix file permissions between the forms you meet on the command line. Type 755 and it shows rwxr-xr-x, a table of who can read, write and execute, and ready-to-run commands such as chmod 755 file and chmod u=rwx,g=rx,o=rx file. It also works the other way: paste the first column of ls -l output, like -rw-r--r-- or drwxrwxrwt, and you get the octal value back, including the file type character. Four-digit modes are supported, so 4755 reveals the setuid bit as an s in the owner's execute position, 2775 shows setgid on a shared directory, and 1777 shows the sticky bit that lets everyone write to /tmp while only owners can delete their files. You can also enter chmod clauses such as u+x,go-w or a=r,u+w. They are applied to the starting mode you give, for example 644, exactly as chmod would apply them, and X adds execute only when some execute bit is already set. The most common mistake is reaching for 777 to fix a permission error: it makes a file writable by every user on the machine, and the calculator warns about world-writable modes. Another is forgetting that a directory needs the execute bit to be entered, so 644 on a folder locks everyone out of it. A capital S or T in symbolic output means the special bit is set without execute, which usually has no effect. The warnings line points out these cases. The calculator runs entirely in your browser.

How to Use

  1. Enter a mode as octal (755), symbolic (rwxr-xr-x), ls -l output or chmod clauses (u+x).
  2. For clauses, set the starting mode they modify.
  3. Copy the octal or symbolic chmod command for your file.

Frequently Asked Questions

What do 755 and 644 mean?

Each digit is a sum of read (4), write (2) and execute (1) for owner, group and others. 755 is rwxr-xr-x, typical for programs and directories; 644 is rw-r--r--, typical for regular files.

What is the fourth leading digit?

It holds the special bits - 4 for setuid, 2 for setgid and 1 for sticky. 4755 runs a program with its owner's privileges; 1777 is the mode of /tmp.

What does a capital S or T mean?

The setuid, setgid or sticky bit is set but the matching execute bit is not. On regular files that combination usually does nothing.

Does this change any files?

No. It only calculates modes and commands in your browser; run the command yourself on your server.

Related Tools