Chmod Calculator
Calculate Unix file permissions: tick read, write and execute for owner, group and others, or enter 755 or rwxr-xr-x, and get the chmod command.
| Read (4) | Write (2) | Execute (1) | |
|---|---|---|---|
| Owner (user) | |||
| Group | |||
| Others | |||
| Special |
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the Chmod Calculator
- 1 Tick the permissions you want, or type an octal (755) or symbolic (rwxr-xr-x) mode.
- 2 Read the octal and symbolic notation.
- 3 Copy the chmod command.
About the Chmod Calculator
On Linux, macOS and other Unix systems every file and directory has permissions for three classes: the owner (user), the group and everyone else (others). Each class can read (r), write (w) and execute (x). For a directory, execute means you may enter it and access files inside.
In octal notation each class is one digit: read counts 4, write 2 and execute 1, added together. 7 is rwx, 6 is rw-, 5 is r-x and 4 is r--. So chmod 755 means rwx for the owner and r-x for group and others, typical for programs and directories; 644 (rw-r--r--) is typical for ordinary files, and 600 keeps a file private to its owner.
An optional fourth digit at the front sets special bits: 4 is setuid (run as the file's owner), 2 is setgid (run as the group, or new files inherit the directory's group) and 1 is the sticky bit (in a shared directory like /tmp, only the owner may delete their files). In symbolic notation they appear as s or t in the execute position, or S and T when execute isn't set.
Frequently asked questions
What does chmod 755 mean?
Owner: read, write and execute (7). Group and others: read and execute (5). Common for scripts, programs and directories.
What permissions should a website's files have?
Usually 644 for files and 755 for directories. Never use 777: it lets every user on the system change your files.
What does a capital S or T mean?
The setuid/setgid or sticky bit is set, but the execute permission under it isn't, which is usually a mistake.
Is this the same as umask?
No. umask removes permissions from the defaults for new files; chmod sets the permissions of existing files. A umask of 022 gives new files 644 and directories 755.