Chmod Calculator

File permissions as octal (755) or symbolic (rwxr-xr-x).

About Chmod Calculator

A chmod calculator that converts between permission checkboxes, octal numbers such as 755 or 644 and symbolic notation such as rwxr-xr-x, with the command.

How to use

  1. Tick read, write and execute for the owner, group and others, or type an octal number (644, 4755) or symbolic string (rw-r--r--) directly. The other two views update at once.
  2. Tick Setuid, Setgid or Sticky when a program or directory needs them. They appear as a leading fourth digit and as s or t in the execute position.
  3. Copy the chmod command and read the one-line description to check it says what you meant.

What it does

  • Each permission class is one octal digit: read is 4, write is 2 and execute is 1, added together. rwx is 7, r-x is 5, r-- is 4.
  • The optional leading digit holds the special bits: setuid 4, setgid 2, sticky 1, so 4755 is setuid plus 755.
  • In symbolic form a lowercase s or t means the special bit and execute are both set; uppercase S or T means the special bit is set without execute, which is almost always a mistake.
  • Pasting a line from ls -l works: a leading file-type character such as d or - is ignored.
  • Invalid text shows an error and leaves the checkboxes where they were.

Example

Octal      755
Symbolic   rwxr-xr-x
Command    chmod 755 file
Meaning    Owner can read, write and execute; group and others can read and execute.

Privacy

Everything is calculated in the browser. No request is made, and nothing is stored.

Frequently asked questions

What does chmod 755 mean?
The owner can read, write and execute (7); the group and everyone else can read and execute but not write (5 and 5). It is the usual mode for directories and for scripts and programs that others should be able to run.
What is the difference between chmod 644 and 755?
644 has no execute bits: the owner can read and write, others can only read. 755 adds execute for everyone. Use 644 for ordinary files such as HTML, images and config, and 755 for directories and executables, since a directory needs execute to be entered.
What does chmod 777 do and is it safe?
It lets every user on the system read, write and execute the file. That is rarely needed and is a security hole on a shared or internet-facing machine; a web server, for example, should never own writable 777 files. Fix the owner or group instead.
What is the sticky bit (chmod 1777)?
On a directory the sticky bit (octal 1000, shown as t) means files inside can only be deleted or renamed by their owner, the directory owner or root, even though everyone can create files there. /tmp is the classic example and is normally 1777.