chmodcalculator
POSIX & Linux Permission Engine

Calculate Linux File Permissions Instantly

The fastest way to convert, inspect, and verify Unix/Linux file permissions. Switch between numeric octal digits, symbolic notation, and ready-to-run shell commands with real-time feedback.

Ready-to-run Linux command
chmod 755 filename

Permission Checkbox Matrix

Click any permission to recalculate instantly
User / Owner (u)
File creator / owner
Total:7
Group (g)
Assigned user group
Total:5
Others / Public (o)
All other system users
Total:5
4thAdvanced / Special Permissions (SUID, SGID, Sticky Bit)
Dynamic Permission Translation
Owner:Read, Write, Execute (Full access)
Group:Read, Execute
Others:Read, Execute
File vs Directory Semantics

For Files: x allows binary or script execution.
For Directories: x is the search/traverse bit, required to cd into the directory and access inner files. Without directory execute, users cannot open subdirectories even with read rights!

Quick Permission PresetsClick to apply
Copied to clipboard
Mathematical Foundation

Octal to Binary & Symbolic Conversion Table

Every octal digit (0–7) directly represents a 3-bit binary triplet where each bit controls Read (4), Write (2), and Execute (1).

OctalBinarySymbolicGranted Rights
7111rwxRead, Write, and Execute
6110rw-Read and Write
5101r-xRead and Execute
4100r--Read Only
3011-wxWrite and Execute
2010-w-Write Only
1001--xExecute Only
0000---No Permissions
POSIX Identity Hierarchy

Understanding Linux User Classes

Linux permissions evaluate access strictly in order: if you match the Owner, group and others permissions are ignored.

u

User / Owner

The individual user account that created or owns the file.

g

Group

Members of the group assigned to the file for shared team access.

o

Others / Public

All other system users with accounts on the operating system.

a

All

Shorthand representing User + Group + Others combined (equivalent to ugo).

Critical Semantic Distinction

File Permissions vs Directory Permissions

The same letter (r, w, x) has fundamentally different operational behavior depending on whether it applies to a file or a folder.

PermissionWhen Applied to a FileWhen Applied to a Directory
r (Read = 4)Open and view the file's data/contents (e.g. with cat, less).List the names of files within the directory (e.g. using ls).
w (Write = 2)Modify, overwrite, or append data to the file.Create new files, delete existing files, or rename files inside the directory (regardless of who owns those files!).
x (Execute = 1)Execute the file as an application, script, or binary program.Traverse/search into the directory (via cd) and access files or subdirectories inside.
Production Reference

Most Common Linux Chmod Permissions

Click any preset to view comprehensive architectural guides, security implications, and real-world scenarios.

Comprehensive Guide

How Linux File Permissions and Chmod Work

A complete overview of the POSIX security architecture, inode flags, and permission calculations.

1. What Does "chmod" Mean?

In Unix and Linux operating systems, chmod is short for "change mode". The "mode" of a file refers to its access permissions and special attribute flags stored inside its filesystem inode. Every file and directory on a Linux filesystem has an owner (User), an associated Group, and defined permissions for anyone else (Others).

$ ls -l myfile.sh
-rwxr-xr-x 1 nikhil staff 4096 Sep 15 22:00 myfile.sh

2. The Binary Octal Number System Explained

Linux permissions are stored in binary bits. Each permission triplet corresponds to three binary switches:

  • Read (r) = 4 (Binary: 100) — Allows viewing data.
  • Write (w) = 2 (Binary: 010) — Allows creating, modifying, or deleting data.
  • Execute (x) = 1 (Binary: 001) — Allows running binaries or traversing directories.

To compute any digit, add the numbers: 4 + 2 + 1 = 7 (Full permissions), 4 + 2 = 6 (Read & Write), 4 + 1 = 5 (Read & Execute), and 4 = 4 (Read only).

3. Security Best Practices: Why You Should Avoid chmod 777

Many tutorials advise running chmod 777 to quickly resolve "Permission denied" errors. In production, this is considered a critical vulnerability. Granting write and execute permissions to "Others" allows any process running on your server (including a compromised web service or third-party package) to overwrite your application code, inject malware, or delete databases.

Recommended alternatives:

Web Files (HTML, JS, CSS, PNG)
chmod 644 filename
Owner can edit; web server can read. Nobody else can tamper.
Web Directories & Folders
chmod 755 /path/to/folder
Allows web server to enter and read contents without modifying.
Knowledge Base

Frequently Asked Questions

Everything you need to know about Linux octal numbers, symbolic strings, and permission calculations.

What is chmod?
chmod stands for "change mode". It is a fundamental Linux and Unix command used to set file and directory access permissions (read, write, execute) for the file owner (User), the group, and all other users on the operating system.
What does chmod 755 mean?
chmod 755 grants the file owner full read, write, and execute permissions (7 = 4+2+1), while group members and others can only read and execute (5 = 4+0+1). In symbolic notation, it is represented as rwxr-xr-x. It is the industry standard for executable scripts and web server directories.
What does chmod 644 mean?
chmod 644 grants read and write permissions to the file owner (6 = 4+2+0), and read-only permissions to the group and all others (4 = 4+0+0). In symbolic notation, it is rw-r--r--. This is the recommended permission for public web assets, HTML, images, and text files.
What does chmod 777 mean?
chmod 777 grants full read, write, and execute permissions to everyone on the system (rwxrwxrwx). Anyone, including untrusted users and compromised web processes, can read, modify, replace, or delete the file. It is considered a major security risk and should never be used on production servers.
What does chmod 700 mean?
chmod 700 gives the owner full access (read, write, execute — rwx), while completely locking out all other users and groups (------). It is ideal for private shell scripts, personal directories, and sensitive folders like ~/.ssh.
What does chmod 600 mean?
chmod 600 gives the owner read and write access (rw-), while preventing all other users and groups from accessing the file (------). It is strictly required for SSH private keys (~/.ssh/id_rsa), database passwords, and .env files.
What does chmod 400 mean?
chmod 400 sets a file to read-only for the owner (r--) and zero access for everyone else. It protects sensitive files from accidental overwrites. Cloud services like Amazon Web Services (AWS) mandate chmod 400 on .pem key pairs before allowing SSH login to EC2 instances.
What is the difference between chmod 755 and 644?
The key difference is the execute permission (x = 1). In 755, the owner has execute rights, and group/others also have execute rights (rwxr-xr-x). In 644, no one has execute rights (rw-r--r--). Use 755 for executable scripts and directories; use 644 for regular static files like HTML, CSS, images, and documents.
What do r, w, and x mean in Linux?
In Linux permissions: "r" stands for Read (view file contents or list directory contents), "w" stands for Write (modify/delete file or add/remove directory entries), and "x" stands for Execute (run a program/script, or traverse into a directory using cd).
How do I calculate chmod octal permissions?
Each permission category is calculated by adding its binary weights: Read = 4, Write = 2, Execute = 1. Add the numbers together for each user class (User, Group, Others). For example, Read + Write + Execute = 4 + 2 + 1 = 7; Read + Execute = 4 + 1 = 5. Combining User(7), Group(5), and Others(5) gives 755.
What does rwxr-xr-x mean?
rwxr-xr-x is a 9-character symbolic permission string divided into three triplets: User (rwx = read, write, execute), Group (r-x = read and execute), and Others (r-x = read and execute). In octal notation, it translates to 755.
What are SUID, SGID, and the Sticky Bit?
These are special Linux permissions represented by a 4th leading octal digit: SUID (4000) causes an executable to run with the file owner’s privileges; SGID (2000) runs with group privileges or enforces group inheritance on directory files; Sticky Bit (1000) prevents users from deleting files in a shared world-writable directory (like /tmp) unless they own the file.