UNIX File Permissions Explained
UNIX-like operating systems (Linux, macOS) use a permissions system to restrict file and directory access. Permissions are divided into three user classes:
- Owner (User): The creator of the file.
- Group: A collection of users associated with the file.
- Others (Public): Any other user on the system.
Each class has three permissions:
- Read (r): Permission to view file contents.
- Write (w): Permission to modify the file.
- Execute (x): Permission to run the file as a program.
Understanding Octal Values
Octal values represent permissions as three-digit numbers:
- Read (r) = 4
- Write (w) = 2
- Execute (x) = 1
To calculate the value for a user class, sum the active permissions. For example, read (4) and write (2) equals 6. Summing these values for Owner, Group, and Others generates the final chmod command (e.g. chmod 755 filename).
Step-by-Step Guide: How to Use this Tool
- Toggle the checkboxes for User, Group, and Others.
- The octal and symbolic values will calculate automatically.
- Copy the generated chmod command to apply permissions in your terminal.