CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Developer
How-to

How do I calculate a chmod permission value?

Short answer

Use a browser-based chmod calculator: tick the read, write and execute boxes for owner, group and others and it gives you the octal value like 755, along with the matching symbolic string. It runs on your device and takes the guesswork out of Unix file permissions.

How the octal number is built

Unix permissions have three groups, owner, group and others, each with read, write and execute bits worth 4, 2 and 1. You add the bits within a group to get one digit, then read the three digits together. Read plus write plus execute is 4 plus 2 plus 1 equals 7, and read plus execute is 4 plus 1 equals 5, which is how rwxr-xr-x becomes 755. A calculator does this addition for you and shows both notations.

Common values worth recognizing

755 is typical for directories and executables, where the owner can do everything and everyone else can read and traverse. 644 suits regular files, giving the owner read and write and others read only. 700 locks a file to its owner entirely. Ticking boxes instead of memorizing these avoids the classic mistakes, like accidentally making a file world-writable.

Step by step

  1. Set the permissions. Tick read, write and execute for owner, group and others.
  2. Read the octal value. The calculator shows the octal number and the symbolic string in your browser.
  3. Use it with chmod. Apply the value, for example chmod 755, to your file or directory.

Frequently asked questions

What does 755 mean?

Owner has read, write and execute (7); group and others have read and execute (5 each). It is common for directories and executables.

What is the difference between 644 and 755?

644 gives no execute bit, suiting regular files; 755 adds execute, which directories and programs need.

Is anything sent to a server?

No. The calculation runs entirely in your browser.

Related answers