Skip to content

Chmod Calculator

Tick the permissions each class of user should have. The calculator shows the matching octal mode, the symbolic string that ls displays and the command to apply it.

Result

Octal mode
755
Symbolic notation
-rwxr-xr-x
Command
chmod 755 filename
Owner
7 = rwx
Group
5 = r-x
Others
5 = r-x

Formula

  • read = 4, write = 2, execute = 1
  • Each digit is the sum for one class: owner, group, others
  • 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--, 0 = ---

How the Chmod Calculator works

Unix and Linux store permissions as three groups of three bits. The groups apply to the file's owner, its group and everyone else. Within each group the bits allow reading, writing and executing.

Each group is written as one octal digit by adding 4 for read, 2 for write and 1 for execute. For a directory, execute means permission to enter it.

Worked example

Owner read, write and execute is 4 + 2 + 1 = 7. Group and others with read and execute are 4 + 1 = 5 each. The mode is 755, shown by ls as -rwxr-xr-x.

Frequently asked questions

What does chmod 755 mean?

The owner can read, write and execute. The group and everyone else can read and execute but not modify. It is the usual mode for programs and public directories.

What does chmod 644 mean?

The owner can read and write. The group and others can only read. It is the usual mode for ordinary files such as web pages.

Why is chmod 777 discouraged?

It lets every user on the system modify and run the file. That is rarely needed and is a common security problem on shared servers.

Related calculators

All text, code and network calculators · All calculators

Related unit converters

Calculations run in your browser and nothing you enter is sent to a server. Results are provided for general information. Check critical figures independently before relying on them.

☕ Like this tool?

Buy me a coffee to support development

☕ Support UnitGenie

If this tool has been helpful, consider buying me a coffee to support development and keep it free for everyone!