Home › Developer Tools › Unix chmod Calculator

Unix chmod Calculator

Tick the permissions for the owner, group and other, or type an octal value, and see the rwx string and the chmod command. Works both ways.

Permissions
Owner
Group
Other
Special bits

One to four digits from 0 to 7, for example 644 or 4755.

Octal 755 is rwxr-xr-x.
Octal value755
rwx stringrwxr-xr-x
chmod commandchmod 755 file
This tool needs JavaScript. Nothing you enter is sent or stored, and it does not change any file. The chmod command is text for you to run on a system you control.

How it works

Each permission has a value: read is 4, write is 2 and execute is 1. For each of the owner, group and other, add the values of the permissions that are on. The three digits are the owner, group and other in that order. For example, 755 means owner 7 (4 + 2 + 1, so read, write and execute), group 5 (4 + 1, so read and execute) and other 5 (read and execute).

An optional fourth digit at the front holds the special bits: setuid is 4, setgid is 2 and sticky is 1. Leave it out, or write it as 0, when none are set. Octal values run from 0 to 7777.

The rwx string is the same permissions written as nine characters, as ls -l shows them. A special bit replaces the execute letter in its class. Setuid and setgid show as s when execute is also set and S when it is not. Sticky shows as t or T in the same way. For example, 4755 is rwsr-xr-x, and 1777 is rwxrwxrwt.

chmod changes the permissions of a file or folder you have the right to change. Replace file in the command with the name of your file.