chmod Calculator

Calculate Linux file permissions visually.

|
Read (4)
Write (2)
Execute (1)
Owner
Group
Public
-rwxr-xr-x
$ chmod 755 filename.txt
Common:

On this page

What is chmod?

chmod (change mode) is a Unix and Linux command used to restrict or grant access to files and directories. It allows system administrators to precisely control who can read, write, or execute a file by assigning permissions to the file's owner, group, or the general public.

Linux & Unix File Permissions Calculator

Managing Linux and Unix file permissions shouldn't require mental math or complex terminal charts. Whether you are configuring a secure web server or deploying a local script, one wrong numeric permission can expose your entire system to botnets and ransomware.

The Countimator chmod Calculator is a free, bidirectional translation engine designed for modern developers. It instantly bridges the gap between visual access rights (Read/Write/Execute) and cryptic Octal numbers (e.g., 755) used in the terminal. Type a number to instantly decode it, or toggle the visual checkboxes to generate the bulletproof command code you need.

Two Ways to Generate chmod Commands

Most basic file permission tools only work one way. We built a fully reactive chmod command generator that adapts to your workflow:

1. Visual Mode (Click & Set)

Don't know the exact number? Use the interactive 3x3 grid. Check "Read" or "Write" for the Owner, Group, or Public. The calculator instantly generates the Octal value (e.g., 644) and the Symbolic string (e.g., -rw-r--r--).

2. Reverse Mode (Decode)

Found a StackOverflow tutorial telling you to run chmod -R 777? Type "777" into the input field to see exactly what access rights you are granting before you run it. (Spoiler: It allows anyone on the internet to modify or delete your files!)

How Octal Permissions Work: The 4-2-1 Rule

According to the official Linux chmod man documentation, file permissions rely on binary math summed into single octal digits. Each permission type has a specific numeric weight:

r (Read) = 4

w (Write) = 2

x (Execute) = 1

- (None) = 0

To get the final digit for a user class (Owner, Group, or Public), simply sum the values. For example, granting Read (4) and Execute (1) results in 5.

A standard 755 permission code is three of these sums lined up: 7 (Owner: 4+2+1) / 5 (Group: 4+1) / 5 (Public: 4+1).

Common chmod Presets & 2026 Security Standards

Not sure which octal code to use? Our calculator includes one-click presets for the most common server and file scenarios.

Octal Symbolic Use Case Safety Level
644 -rw-r--r-- Standard Files (HTML/CSS/Config). Owner can read and write; everyone else can only read. Safe
755 -rwxr-xr-x Directories & Executables. Owner has full control; everyone else can execute/access but not modify. Safe
600 -rw------- Private SSH Keys. Only the owner can read or write. Critical for secure .pem or .pub authentication files. Very Secure
777 -rwxrwxrwx The Danger Zone. Everyone can read, write, and execute. A massive security risk on live web servers. Unsafe

Instant Terminal Commands

Once you have configured your permissions visually, the tool generates the exact semantic command syntax you need to apply it.
Example: chmod -R 755 /var/www/html
Simply click the clipboard icon to copy the generated script and paste it directly into your SSH terminal (PuTTY, macOS Terminal, Bash, or Linux Shell).

Frequently Asked Questions (FAQ)

Using chmod 777 gives "Write" and "Execute" permission to the "Public" (everyone). This means any automated bot, hacker, or malicious script on your server can delete, edit, or inject malware directly into your files. Always operate on the principle of "Least Privilege" by using restricted permissions like 644 or 755.

They represent the exact same access rights. Octal is the numerical representation (e.g., 755), often used because it is much faster to type in terminal commands. Symbolic is the letter representation (e.g., rwxr-xr-x), which is what you visually see when you run an ls -l command to list files.

The -R (recursive) flag tells the permission command to apply the chosen access rights to the target directory and every single file and sub-folder nested inside it. Use this with extreme caution: recursively setting 777 can irrevocably compromise an entire web server in seconds.

For a standard file, "Execute" allows it to run as a program or script. However, for a folder (directory), "Execute" permission is mathematically required just to enter or cd into that directory. This is why directory permissions require 755 (Execute allowed) while standard files strictly need 644.

While chmod (change mode) modifies the access permissions (read, write, execute) of a file, chown (change owner) changes the actual file ownership. You use chown to assign a file to a specific user or group, and then use chmod to dictate exactly what that user is allowed to do with it.

Security Note: The file permissions generated by this interactive tool are standard Linux/Unix defaults. Always verify permissions and consult your system administrator before applying them to a live production server. Countimator is not responsible for security vulnerabilities caused by improper configuration.