Chmod calculator

What permissions would you give?
Owner Group Other

Not sure which value to use in your chmod command? This tool will help you to not make mistake anymore.

Just check the boxes corresponding to the permissions you want to give on a file or folder, and you’ll get the corresponding “chmod” command line.


What is chmod?

Chmod is a command on Linux-based systems that you can use to change the file permissions. The base syntax looks like this:
(sudo) chmod <options> <file or folder>
For example:
chmod 777 /home/user/folder
Will add all privileges to everyone on the specified folder.
Another example:
chmod u+x /home/user/
Will add the permission to execute the script for the owner.

How chmod works on Linux?

Have you can see in the previous example, the syntax is not very intuitive. Beginners and even more experienced Linux users may have some difficulty to find the correct command line to use. That’s why I create this tool.

Choose the permissions you want to give to your file or folder by checking the corresponding boxes, and the tool will generate the correct command line automatically for you.

If you still want to understand, the idea is that there are 3 levels of permissions: user, group and other.
User is the owner of the file (your username, for example), group is a group of other people who may have some permissions on this file (the system administrators, for example) and other is anybody who is not you and not in the previous group.

The first digit is for the user, the second for the group and the third for the other users.
Then, there are 3 permissions you can give: read, write and execute.
Each permission has a weight: read (4), write (2) and execute (1). So, 7 is the maximum you can give will all permissions.
Here are a few examples:

  • 777: all privileges to any user on the system.
  • 700: all privileges for the owner, no permissions for the other.
  • 644: Read and write for the owner, read-only for the other.

I hope it helps you to better understand how the chmod command line works. And anyway, you still use the tool above to generate them effortlessly 🙂