Neckrez

chmod calculator: permissions to octal and back

Tick the permissions you want and get the chmod command, the octal number and the rwx string. Or type an octal number or an rwx string and see which boxes it means.

How the numbers work

Each permission is worth a number: read is 4, write is 2 and execute is 1. Add them up for each of owner, group and others. rwx is 4+2+1 = 7, r-x is 4+1 = 5, r-- is 4. So rwxr-xr-x is 755.

Modes you will use most

The special bits

setuid and setgid make a program run with the rights of its owner or group, and the sticky bit on a shared directory, like /tmp, stops users deleting each other’s files. They add a fourth leading digit, for example 4755 or 1777.

More tools