Chmod Calculator
Interactive Linux file permissions calculator. Toggle checkboxes or type an octal number to convert between numeric and symbolic chmod notation. Supports SUID, SGID, and sticky bit.
chmod 755 filenameOctal Permission Reference
Each digit is the sum of its permission values: read (4), write (2), execute (1).
| Octal | Binary | Symbolic | Permissions |
|---|---|---|---|
0 | 000 | --- | No permissions |
1 | 001 | --x | Execute only |
2 | 010 | -w- | Write only |
3 | 011 | -wx | Write + Execute |
4 | 100 | r-- | Read only |
5 | 101 | r-x | Read + Execute |
6 | 110 | rw- | Read + Write |
7 | 111 | rwx | Read + Write + Execute |
Understanding Linux File Permissions
The Permission Model
Linux uses a permission model with three categories of users: the file owner (user), the group assigned to the file, and others (everyone else). Each category can have read (r), write (w), and execute (x) permissions independently. The chmod command changes these permissions.
Octal vs Symbolic Notation
Permissions can be expressed in two ways. Octal notation uses a number where each digit (0-7) represents the combined permissions for owner, group, and others. For example, chmod 755 sets rwx for owner and r-x for group and others. Symbolic notation uses letters: chmod u+x adds execute for the owner, chmod go-w removes write from group and others.
Special Permission Bits
Beyond the basic rwx permissions, Linux supports three special bits. The SUID bit (4000) on an executable causes it to run as the file owner, commonly seen on commands like passwd. The SGID bit (2000) similarly runs with group privileges, and on directories forces new files to inherit the directory's group. The sticky bit (1000) on directories prevents users from deleting files owned by other users — the classic example is /tmp.
Security Best Practices
Follow the principle of least privilege: only grant the permissions that are actually needed. Avoid using chmod 777 in production as it allows anyone to read, modify, and execute the file. Configuration files with sensitive data (database passwords, API keys) should typically be 600 or 400. Web-accessible directories usually need 755 and files 644.