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.
One to four digits from 0 to 7, for example 644 or 4755.
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.