What this chmod calculator does
Unix file permissions are a 12-bit number that most people only meet as 755 or 644. This calculator makes the bits visible. Toggle read, write and execute for owner, group and others, plus the special setuid, setgid and sticky bits, and see the octal and symbolic forms (rwxr-xr-x) update together along with a ready-to-run chmod command. You can also type an octal number or a symbolic string to decode it, apply a symbolic expression like u+x,go-w to an existing mode, and work out what a umask means for newly created files and directories.
How to use it
- Click the checkboxes in the permission grid, or type
750,0644orrwxr-x---into the input. - Read the octal value, symbolic string and generated command, for example
chmod 750 deploy.sh. - To try an expression, enter it in apply chmod expression and see the resulting mode.
- In the umask section, enter a value like
022to see that new files get644and new directories755.
Common permission values
- 644 (
rw-r--r--): regular files such as HTML, config or source files. - 755 (
rwxr-xr-x): executables, scripts and directories. - 600 (
rw-------): private files like SSH keys;sshrefuses keys that are more open. - 700 (
rwx------): private directories such as~/.ssh. - 775 / 664: shared group directories and files.
- 1777 (
rwxrwxrwt):/tmp, where the sticky bit stops users deleting each other's files. - 2775: setgid on a directory makes new files inherit the directory's group.
How umask works
The umask removes permissions from the defaults: files start at 666 and directories at 777. With umask 022, write permission is removed for group and others, giving 644 and 755. With umask 077, only the owner gets access. Execute bits are never added to new files by umask.