HomeGuidesLinux File Permissions Demystified: Chmod 755, 644 and 777 Explained
System & DevOps6 min readUpdated 2026-11-03

Linux File Permissions Demystified: Chmod 755, 644 and 777 Explained

The complete beginner-to-advanced reference for Unix file permission bits, octal calculation, read-write-execute rights, and server security hardening.

Need to do this immediately?

Use our free, private client-side browser tool with zero installation.

Launch Visual Chmod Calculator
Linux and POSIX file permission modes govern who can read, write, and execute files on web servers, Docker containers, and local Unix environments. Understanding how numeric octal modes like 755, 644, and 400 are calculated is vital for DevOps security.

The Three User Tiers and Permission Values

Unix systems categorize access into three distinct user scopes: Owner (User who created the file), Group (Members of the file's assigned group), and Public/Others (Any other user on the system).

Each scope is assigned a combination of three fundamental rights: Read (r = 4), Write (w = 2), and Execute (x = 1). Summing these numbers produces an octal digit between 0 and 7 for each scope.

Why Chmod 777 Is a Critical Security Hazard

Developers frequently run "chmod -R 777" as a quick troubleshooting measure when encountering "Permission Denied" errors in web servers like Nginx or Apache. This grants unrestricted read, write, and execute permissions to every process and local user on the machine.

If an attacker discovers an arbitrary file upload vulnerability in your application, chmod 777 allows them to write and execute malicious web shells directly within the directory.

Industry best practices dictate chmod 644 (Owner: rw, Group: r, Other: r) for standard web files, and chmod 755 (Owner: rwx, Group: r-x, Other: r-x) for directories and executable binaries.

Pro Tip:For SSH private keys (~/.ssh/id_rsa or .pem files), cloud providers enforce strict chmod 400 or 600 permissions; any broader permission will trigger an SSH connection rejection.

Step-by-Step Tutorial

1

Select Desired Rights

Toggle Read, Write, and Execute checkboxes for Owner, Group, and Others in the calculator.

2

Inspect Octal Notation

View the instant 3-digit octal notation (e.g., 755) and symbolic representation (e.g., -rwxr-xr-x).

3

Copy Terminal Command

Copy the ready-to-run Linux bash command "chmod 755 filename" for your production server.

Ready to Try It Yourself?

DocSwift processes everything directly on your device. Fast, safe, and completely free forever.

How helpful was this guide?

Rated 4.9 / 5 by 3,420+ users worldwide

Share with Colleagues & Friends

Help others protect their document privacy

Frequently Asked Questions

What permissions should standard WordPress or web files have?

Typically 755 for folders/directories, 644 for HTML/PHP files, and 400/440 for configuration files like wp-config.php.

What does the leading zero mean in chmod 0755?

The leading zero represents special permission bits: SUID (4), SGID (2), and Sticky bit (1). Standard permissions use 0.