CalculaIT / tools

chmod permissions calculator

Turn 755 into rwxr-xr-x and back.

Fields contain editable examples.

Result
Octal
755
Symbolic
rwxr-xr-x
Owner
rwx
Group
r-x
Others
r-x
Command
chmod 755
Quick answer · example

What does chmod 755 mean?

chmod 755 gives the owner read, write and execute (rwx) and gives the group and everyone else only read and execute (r-x). In letters it is rwxr-xr-x. It is the usual permission for folders and scripts.

Calculation assumptions

Translates Linux permissions between numbers (755) and letters (rwxr-xr-x) both ways, including setuid, setgid and sticky. Shows the command ready to copy.

View the worked example ↓

Formula and assumptions

r = 4 · w = 2 · x = 1 · owner + group + others (setuid 4000, setgid 2000, sticky 1000)

Translates Linux permissions between numbers (755) and letters (rwxr-xr-x) both ways, including setuid, setgid and sticky. Shows the command ready to copy.

All amounts use the same currency of your choice. These are estimates, not measurements or offers.

How to use this calculator

Type the permissions as a number (644, 755, 4755) or as letters (rw-r--r--, also with the leading dash shown by ls -l) and you get the other form and the command. Each digit adds read (4), write (2) and execute (1) for owner, group and others.

Worked example

  1. Owner: 4 + 2 + 1 = 7 (rwx).
  2. Group: 4 + 1 = 5 (r-x).
  3. Others: 4 + 1 = 5 (r-x), so 755 = rwxr-xr-x.

Example result

Octal
755
Symbolic
rwxr-xr-x

Interpreting the result

Web files and documents usually use 644; folders and scripts, 755; SSH private keys, 600. Avoid 777: it lets any user on the system modify the file. A fourth leading digit (4, 2 or 1) turns on setuid, setgid or sticky, which show as s or t in the execute position.

Frequently asked questions

What is the sticky bit?

On a folder such as /tmp (1777) it stops users deleting other users files even if they can write to the folder.

What does a capital S mean?

That setuid or setgid is set but execute permission is not. It is usually a configuration mistake.

How do I apply permissions to a folder and its contents?

With chmod -R, but carefully: folders usually need 755 and files 644, so find with -type d and -type f is a better option.

References and method

References and method