Chmod Calculator
Convert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation. Edit any one and the others update instantly.
| Who | Read (4) | Write (2) | Execute (1) |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Special bits (setuid, setgid, sticky)
How the numbers work
A Unix permission is three groups - owner, group, others - and each group has three switches:
read, write and execute. Give each switch a value (read is 4, write is 2, execute is 1) and add
up the ones that are on. That sum, 0 to 7, is one octal digit. Three digits describe the whole
file: 755 is owner 7 (rwx), group 5 (r-x), others
5 (r-x). The symbolic form rwxr-xr-x spells out the same thing with
letters, which is what ls -l prints.
The permissions you actually use
| Octal | Symbolic | Typical use |
|---|---|---|
| 644 | rw-r--r-- | Regular files: owner edits, others read |
| 755 | rwxr-xr-x | Directories and executable scripts |
| 600 | rw------- | Private keys and secrets: owner only |
| 700 | rwx------ | Private directories |
| 777 | rwxrwxrwx | Avoid: world-writable, a security hole |
Special bits
A fourth leading digit sets the special bits. Setuid (4) runs an executable as its owner,
setgid (2) runs it as its group or makes a directory hand its group to new files, and the
sticky bit (1) on a shared directory like /tmp stops users deleting files they do
not own. In symbolic form these replace the execute letter: 4755 shows as
rwsr-xr-x and the classic 1777 on /tmp is
rwxrwxrwt.
Working on a server? The cron expression generator helps with scheduled jobs and the URL parser breaks down endpoints you are debugging.