All posts
Understanding Linux File Permissions: Octal Notation and Chmod Guide
August 15, 2026 · DevTools
linux
chmod
devops
security
sysadmin
Understanding Linux File Permissions: Octal Notation and Chmod Guide
Unix file permissions determine who can read, write, or execute files and directories on Linux and macOS systems. Incorrect permissions are a leading cause of deployment errors and security vulnerabilities.
Calculate and translate permission strings using the Chmod Calculator.
The Three Permission Triads
Every Linux file has three sets of permissions:
- User (u): The owner of the file.
- Group (g): Members of the file's assigned group.
- Others (o): Everyone else on the system.
Each triad has three permission bits:
- Read (r): Value
4(View file contents / list directory files) - Write (w): Value
2(Modify file / create and delete files in directory) - Execute (x): Value
1(Run script or binary / traverse directory)
Common Chmod Modes
| Octal | Symbolic | Usage |
|---|---|---|
| 755 | -rwxr-xr-x | Web server directories and executable scripts |
| 644 | -rw-r--r-- | Standard web files (HTML, CSS, images, JS) |
| 600 | -rw------- | Private SSH keys (id_rsa) and sensitive config files |
| 700 | -rwx------ | Private scripts and user ~/.ssh directory |
| 777 | -rwxrwxrwx | Open permissions (Security risk: avoid in production) |
Use the Chmod Calculator to toggle checkboxes and get instant octal and symbolic commands.