Chmod Calculator
A calculator to help change the permissions of files on Linux
Group Permissions
Presets
Converted Permissions
chmod 000 /path/to/file.txt
- The Owner cannot do anything
- The Group cannot do anything
- The Other cannot do anything
Linux file permissions are separated into the Owner, Group, and Other groups. These refer to the file's owner, their group, and any other users. These can be represented by read/write/execute flags written in either octal (base 8) or symbolically (letter or -).
Both the octal and symbolic representations have a leading representation of zero. This is where the flag of whether a file is a directory or not would be. In actual use, this is either ignored or left as the zero in most cases.
As an example, the permission of 740 would represent:
- 7: Owner can read, write, and execute
- 4: Group can read
- 0: Others cannot do anything
If you were to write the same permissions in symbolic form, it would be rwxr-----
Representation
Both octal and form and symbolic form are able to distingush all variations of the read write execute permissions by essentially setting bit flags. Octal just adds each trio of bit flags together for convenience.
In octal form, the number is representative of the 3 bits which represent the read/write/execute permissions. After the optional leading zero, the read/write/execute bits are written as bit triplets. Each value is 'worth' (counted as) a different amount so every possible combination of flags can be represented.
- Read: 4
- Write: 2
- Execute: 1
Each bit triplet will then add together to give you the number you see in octal.
In symbolic form, the dash or letter represents the bits in a slightly easier to read format. After the optional leading zero (dash in this case), the read/write/execute bits are written in order with a letter representing permission and a dash representing no permission.
- Read: r
- Write: w
- Execute: x
Each group of three bits are then simply placed in order.
Additional Resources
- Cheatsheet.zip – Chmod more recipes and usage examples