Chmod Calculator
Calculate Linux/Unix file permissions visually. Convert between octal and symbolic notation.
Common Permission Presets
About Chmod Calculator
File permissions are a cornerstone of Unix and Linux security, controlling exactly who can read, write, and execute every file and directory on the system. The chmod (change mode) command uses either octal notation (three digits like 755) or symbolic notation (letters like rwxr-xr-x) to set these permissions. Understanding chmod permissions is essential for every Linux administrator and developer -- incorrect permissions are one of the most common causes of "Permission denied" errors, web server misconfigurations, and security vulnerabilities on Unix-based systems.
Unix Permissions Quick Reference
Each permission has a numeric value: read (r) = 4, write (w) = 2, execute (x) = 1. The three digits in octal notation represent owner, group, and others respectively. Common permission sets include: 755 (standard for directories and scripts -- owner can do everything, others can read and execute), 644 (standard for files -- owner can read/write, others read only), 600 (private files like SSH keys and .env files), and 777 (full access for everyone -- generally a security risk and should be avoided in production).
For web servers, the recommended permissions are 755 for directories and 644 for files, with the web server user as the owner. Sensitive configuration files (.env, database credentials, SSL certificates) should use 600. SSH keys require exactly 600 permissions -- the SSH client will refuse to use keys with looser permissions. The special permissions setuid (4000), setgid (2000), and sticky bit (1000) add advanced access control: setuid runs a program as the file owner, setgid inherits the group of the parent directory, and the sticky bit prevents users from deleting files they do not own in shared directories like /tmp.
Frequently Asked Questions
What is chmod?
chmod (change mode) is a Unix/Linux command that changes file and directory permissions. It controls who can read, write, and execute files. Permissions are set for three groups: Owner, Group, and Others.
What does 755 mean?
755 means the owner has full permissions (read + write + execute = 7), while group and others can read and execute but not write (read + execute = 5). This is the standard permission for directories and executable scripts.
What is the difference between octal and symbolic notation?
Octal notation uses 3 digits (e.g., 755) where each digit represents permissions for owner, group, and others. Symbolic notation uses letters (e.g., rwxr-xr-x) where r=read, w=write, x=execute, and -=no permission.