Chmod Calculator

Convert Linux file permissions between checkboxes, octal and symbolic notation — and copy the exact chmod command.

Class Read (4) Write (2) Execute (1) Octal
Owner (u) 7
Group (g) 5
Others (o) 5
755
rwxr-xr-x
Owner: read/write/execute · Group: read/execute · Others: read/execute
chmod 755 filename
Low Risk Any user can read this file — never use it for secrets such as keys or .env files.
View the full chmod 755 guide →
Advertisement

How chmod Permissions Work

Read Permission
4

View file content or list directory names.

Write Permission
2

Modify files or add/delete directory files.

Execute Permission
1

Run programs or traverse into directories.

Linux calculates permissions for three user classes: the file Owner (u), the assigned Group (g), and Others (o). Each digit in a 3-digit chmod command is simply the sum of the desired rights for that class. For example, granting full access (Read 4 + Write 2 + Execute 1) equals 7. Granting Read (4) and Execute (1) equals 5. Combining these produces the universal standard chmod 755.

Most Common chmod Permissions

Frequently used file and directory modes in Linux systems administration:

Advertisement

Recommended Permissions Cheat Sheet

Quick reference guide for securing standard web assets, credentials, and server files:

Use Case Mode Symbolic Command
Web directories 755 rwxr-xr-x chmod 755 /var/www/html
Web files (HTML, CSS, PHP) 644 rw-r--r-- chmod 644 index.html
Executable scripts 755 rwxr-xr-x chmod 755 deploy.sh
SSH private key (~/.ssh/id_ed25519) 600 rw------- chmod 600 ~/.ssh/id_ed25519
~/.ssh directory 700 rwx------ chmod 700 ~/.ssh
authorized_keys 600 rw------- chmod 600 ~/.ssh/authorized_keys
AWS .pem key 400 r-------- chmod 400 key.pem
/etc/sudoers 440 r--r----- chmod 440 /etc/sudoers
Shared group project directory 2775 rwxrwsr-x chmod 2775 /var/project
/tmp-style shared directory 1777 rwxrwxrwt chmod 1777 /tmp
wp-config.php 440 r--r----- chmod 440 wp-config.php
.env files 600 rw------- chmod 600 .env

Special Permissions (setuid, setgid, sticky bit)

Linux supports an optional leading fourth digit for advanced security policies, including process privilege elevation and collaborative group directory inheritance:

Linux Permission Guides

Comprehensive tutorials explaining Unix security fundamentals and best practices:

Popular Comparisons

Compare frequently confused file permissions side by side:

Frequently Asked Questions

What does chmod 755 mean?

chmod 755 grants read, write, and execute permissions (7) to the file owner, and read plus execute permissions (5) to group members and all other users. It is the international standard configuration for Linux directories, web roots, and executable programs.

What is the difference between chmod 644 and 755?

chmod 644 provides read and write permissions to the owner, and read-only access to others, omitting the execute bit entirely. chmod 755 includes the execute bit for all classes. Regular files (HTML, CSS, images) should use 644, while directories and executable scripts require 755.

Is chmod 777 safe?

No. chmod 777 grants full read, write, and execute access to every user and process on the entire operating system. It allows unprivileged local users or compromised scripts to overwrite or delete files, and should never be used on production servers.

How do I calculate chmod numbers?

Each permission right has an octal value: Read = 4, Write = 2, and Execute = 1. To determine the digit for a user class, add their rights together (e.g., Read + Write = 4 + 2 = 6). Repeating this for owner, group, and others creates a 3-digit mode like 755 or 644.

What does the first digit mean in a 4-digit chmod like 4755?

The leading digit in a 4-digit chmod command represents special permissions: 4 designates setuid (runs with owner privileges), 2 represents setgid (inherits group ownership on directories), and 1 enables the sticky bit (restricts deletion in shared folders like /tmp).

Advertisement