Chmod Calculator

Calculate Unix file permissions visually. Convert between octal and symbolic notation, generate chmod commands instantly. All processing happens in your browser.

Read (4)
Write (2)
Execute (1)
Owner
Group
Others
Octal
755
Symbolic
rwxr-xr-x
-rwxr-xr-x 1 user group 4096 Jan 1 00:00 filename
$ chmod 755 filename

Common Presets

755
Standard Directory / Executable
Owner full, group and others read + execute
644
Standard File
Owner read + write, group and others read only
777
Full Access (Insecure)
Everyone can read, write, and execute
600
Private File
Owner read + write only, no access for others
400
Read-Only (Owner)
Owner read only, no access for others
700
Private Executable
Owner full access, no access for others
666
Read + Write for All
Everyone can read and write, no execute
750
Group Executable
Owner full, group read + execute, no access for others
Advertisement

About Chmod Calculator

The chmod (change mode) command is one of the most fundamental utilities in Unix and Linux systems. It controls who can read, write, or execute a file or directory. Every file on a Unix filesystem carries a set of permission bits that determine access for three classes of users: the file owner, the group associated with the file, and all other users on the system. Understanding and correctly setting these permissions is essential for system security and proper application behavior.

Unix file permissions are represented in two common notations. Octal (numeric) notation uses a three-digit number where each digit ranges from 0 to 7. Each digit is the sum of its component permissions: read (4), write (2), and execute (1). For example, the value 7 (4+2+1) grants read, write, and execute, while 5 (4+0+1) grants read and execute but not write. The three digits correspond to owner, group, and others in that order, so chmod 755 gives the owner full permissions and allows the group and others to read and execute only.

Symbolic notation uses letters to represent permissions: r for read, w for write, and x for execute. A hyphen (-) indicates the permission is not set. The nine-character string is divided into three groups of three: the first group is for the owner, the second for the group, and the third for others. A permission string like rwxr-xr-x shows that the owner can read, write, and execute, while the group and others can read and execute but not write.

Incorrect permissions are one of the most common causes of web server errors, deployment failures, and security vulnerabilities. A file that is too permissive (such as 777) can allow unauthorized users to modify or execute it, while overly restrictive permissions can prevent legitimate services from accessing required resources. This calculator helps you visualize and verify permissions before applying them, reducing the risk of errors on production systems.

Permission Reference

Octal Binary Symbolic Description
0000---No permissions
1001--xExecute only
2010-w-Write only
3011-wxWrite and execute
4100r--Read only
5101r-xRead and execute
6110rw-Read and write
7111rwxRead, write, and execute

FAQ

Q: What does chmod 755 mean?
The permission 755 means the file owner has full permissions (read, write, execute), while the group and other users can only read and execute the file. This is the standard permission for directories and executable scripts on most Unix systems, allowing the owner to modify files while letting others access them without changes.

Q: What is the difference between octal and symbolic chmod notation?
Octal notation uses three digits (e.g., 644) where each digit represents the combined permissions for owner, group, and others. Symbolic notation uses letters and operators (e.g., u+rwx,g+rx,o+rx). Octal sets all permissions at once, while symbolic can modify specific permissions without affecting others. Both achieve the same result but suit different workflows.

Q: Why should I avoid using chmod 777?
Setting permissions to 777 grants every user on the system full read, write, and execute access to the file or directory. This is a serious security risk because any user or compromised process can modify or replace the file. On web servers, this can allow attackers to inject malicious code. Use the minimum permissions necessary for the task instead.

Q: How do file and directory permissions differ?
For regular files, read means viewing contents, write means modifying contents, and execute means running it as a program. For directories, the meanings shift: read allows listing the contents, write allows creating or deleting files within the directory, and execute allows entering the directory and accessing files inside it. A directory typically needs the execute bit set (e.g., 755) for users to traverse into it.

Q: What permissions should I use for SSH keys?
SSH private keys should use 600 (owner read and write only) or 400 (owner read only). SSH will refuse to use a private key if it is accessible by other users. The ~/.ssh directory itself should be set to 700. Public keys and the authorized_keys file should use 644.

Advertisement