chmod Calculator
Tick the permission boxes or type an octal or symbolic mode and see all the forms at once, plus the ready-to-run chmod command. It also handles setuid, setgid, the sticky bit and umask.
Runs in your browser — nothing is uploaded.
| Permission | Owner | Group | Other |
|---|---|---|---|
| Read (r) | |||
| Write (w) | |||
| Execute (x) |
3 or 4 digits, 0–7.
Like ls -l: rwxr-xr-x (a leading file type is ignored).
Command
umask
The permissions that new files and directories get with a given umask.
- New files
- New directories
How to use it
- Tick the read, write and execute boxes for the owner, the group and everyone else, or type an octal mode (755) or a symbolic one (rwxr-xr-x).
- Use the special bits only when you need them: setuid, setgid or the sticky bit.
- Copy the chmod command. To see what a umask leaves you with, type it in the umask box.
Frequently asked questions
What do the octal digits mean?
Each digit is the sum of read (4), write (2) and execute (1) for the owner, the group and others, in that order. So 755 is rwx for the owner and r-x for everybody else, and 644 is rw-r--r--.
What do setuid, setgid and the sticky bit do?
On an executable, setuid (4000) runs it as the file’s owner and setgid (2000) as its group. On a directory, setgid makes new files inherit the group, and the sticky bit (1000) lets only a file’s owner delete it, as in /tmp. They show as s, s and t in the symbolic form (capital S or T when the execute bit is off).
What is a umask?
A mask of permission bits removed from newly created files and directories. Files start from 666 and directories from 777, so a umask of 022 gives 644 and 755.
Which permissions are safe for a website?
Usually 644 for files and 755 for directories. Avoid 777: it lets any user on the machine change the files.
Can I paste the output of ls -l?
Yes. Paste the ten-character form (for example -rwxr-xr-x) in the symbolic box; the first character, the file type, is ignored.