DevTools Logo
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:

  1. User (u): The owner of the file.
  2. Group (g): Members of the file's assigned group.
  3. 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

OctalSymbolicUsage
755-rwxr-xr-xWeb 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-rwxrwxrwxOpen permissions (Security risk: avoid in production)

Use the Chmod Calculator to toggle checkboxes and get instant octal and symbolic commands.

Tools mentioned in this post