Back to Blog
🐧

Calculating Linux Permissions (Chmod)

If you've ever managed a Linux server, you've likely had to use the chmod command to change file permissions. But remembering the numeric values can be tricky.

The Three Roles

Linux assigns permissions to three different roles:

  1. Owner: The user who owns the file.
  2. Group: Other users in the file's group.
  3. Public: Everyone else on the system.

Octal vs Symbolic

Permissions are represented by Read (r), Write (w), and Execute (x). In octal format, these are assigned numeric values:

  • Read = 4
  • Write = 2
  • Execute = 1

To give the Owner full access (4+2+1 = 7), the Group read/execute access (4+1 = 5), and the Public no access (0), you use chmod 750.

Instead of doing mental math every time you configure a server, use a visual Chmod Calculator. Just click the checkboxes for the permissions you want, and instantly copy the exact terminal command you need!

Try it yourself!

Put this theory into practice using our free, client-side tool.

Open Tool