Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
Chmod Calculator

Chmod Calculator

Calculate Unix file permissions in symbolic, octal, and chmod command formats with an interactive permission matrix.

What is Chmod Calculator?

Chmod Calculator is an interactive tool for calculating and converting Unix/Linux file permissions. It helps you quickly set the right permissions using an intuitive visual interface instead of memorizing octal codes or symbolic notation.

Why Use a Chmod Calculator?

Unix file permissions control who can read, write, or execute files and directories. Getting permissions wrong can lead to security vulnerabilities or broken applications. This tool makes it easy to:

Visualize Permissions

Interactive checkbox matrix for intuitive permission management

Convert Between Formats

Seamlessly switch between octal (755), symbolic (rwxr-xr-x), and chmod commands

Generate Commands

Ready-to-use commands you can copy and paste into your terminal

Special Permissions

Handle advanced permissions like Setuid, Setgid, and Sticky Bit

Understanding Permission Basics

Every file and directory in Unix has three permission sets:

Owner (u)

The user who owns the file

Group (g)

Users in the file's group

Others (o)

Everyone else on the system
Permission Values: Each set can have three permissions: Read (4), Write (2), and Execute (1). The octal value is the sum of enabled permissions — for example, read + execute = 4 + 1 = 5.

How to Use Chmod Calculator

1

Permission Matrix

Click the checkboxes in the permission matrix to toggle Read, Write, and Execute for each role (Owner, Group, Others). The octal value, symbolic notation, and generated commands update instantly.

2

Octal Input

Type a 3-digit octal value (e.g., 755) or a 4-digit value with special permissions (e.g., 4755) directly into the octal input field. All checkboxes and outputs sync automatically.

3

Symbolic Input

Type symbolic notation (e.g., rwxr-xr-x) into the symbolic input field. Special characters like s, S, t, and T are supported for setuid, setgid, and sticky bit.

Using Presets

Click any preset button to quickly set a common permission value:

Octal Symbolic Use Case
644 rw-r--r-- Standard for regular files (owner read/write, others read)
755 rwxr-xr-x Directories and executables (owner full, others read/execute)
600 rw------- Private files like SSH keys (owner read/write only)
777 rwxrwxrwx Caution Full access for everyone

Copying Commands

The output section shows ready-to-use chmod commands in both octal and symbolic formats. Click the copy button next to any command to copy it to your clipboard, then paste it into your terminal.

Pro Tip: All generated commands are production-ready and can be executed immediately in your Unix/Linux terminal.

Features

Interactive Permission Matrix

A visual 3x3 grid lets you toggle permissions for Owner, Group, and Others. Each column shows the numeric weight (Read=4, Write=2, Execute=1), and the per-role octal total updates as you click.

Bidirectional Sync

Change any input and everything else updates in real-time — no need to click a "Calculate" button. Edit checkboxes, type octal values, or enter symbolic notation, and all other fields stay in sync.

Special Permissions

Toggle Setuid (4), Setgid (2), and Sticky Bit (1) to generate 4-digit octal values. The symbolic notation correctly shows s/S for setuid/setgid and t/T for sticky bit.

Setuid (4)

File runs with owner's permissions

Setgid (2)

New files inherit group

Sticky Bit (1)

Prevents file deletion by non-owners

File and Directory Mode

Switch between File and Directory to see how permissions appear in ls -l output. Files show a - prefix while directories show d.

Recursive Flag

Enable the Recursive option to add -R to generated chmod commands, useful for applying permissions to directories and their contents.

Example - Recursive Command
chmod -R 755 /path/to/directory

Octal Breakdown

See exactly how each role's octal value is calculated. For example, Owner with read + write + execute shows 4 + 2 + 1 = 7.

Common Presets

One-click presets for frequently used permission values (644, 755, 777, 700, 600, 400, 775, 000) with descriptive tooltips explaining each use case.

Frequently Asked Questions

What is the difference between 644 and 755?

644

rw-r--r--

  • Standard for regular files
  • Owner: read and write
  • Group & Others: read only
  • No execute permission
755

rwxr-xr-x

  • For directories and executables
  • Owner: full access
  • Group & Others: read and execute
  • Execute permission enabled

When should I use 777 permissions?

Permission 777 gives full read, write, and execute access to everyone. This is generally not recommended for production environments as it poses security risks.

Security Warning: Use 777 only for temporary testing or specific shared directories where all users need full access. Never use on production servers or sensitive files.

Safer alternatives:

  • Use 775 for shared directories (no write for others)
  • Use 755 for public executables
  • Use 770 for group-only access

What are Setuid, Setgid, and Sticky Bit?

Setuid (4)

Allows a file to run with the permissions of its owner, regardless of who executes it. Commonly used for system utilities.

Setgid (2)

Makes new files in a directory inherit the group ownership. Useful for shared project directories.

Sticky Bit (1)

Prevents users from deleting files they don't own in a shared directory. Commonly used on /tmp.
Example: A permission of 4755 means Setuid is enabled (4) plus standard 755 permissions.

What is the difference between symbolic and octal notation?

Octal

755

  • Uses numbers (0-7)
  • Each digit is sum of permissions
  • 4 = read, 2 = write, 1 = execute
  • Compact and precise
Symbolic

rwxr-xr-x

  • Uses letters (r, w, x)
  • Shows each permission explicitly
  • r = read, w = write, x = execute
  • More readable and intuitive

How do I apply permissions recursively?

Enable the Recursive (-R) option to generate a command like chmod -R 755 directory. This applies the same permissions to the directory and all files and subdirectories within it.

Example - Recursive Permission Change
# Apply 755 to directory and all contents
chmod -R 755 /var/www/html

# Apply 644 to all files recursively
find /path/to/dir -type f -exec chmod 644 {} \;

# Apply 755 to all directories recursively
find /path/to/dir -type d -exec chmod 755 {} \;
Caution: Be careful with recursive operations. Always verify the path and permissions before executing, as changes affect all nested files and directories.

What permission should I use for SSH keys?

SSH private keys should use 600 (rw-------) — only the owner can read and write. SSH will refuse to use keys with broader permissions for security reasons.

File/Directory Permission Octal Reason
~/.ssh/ rwx------ 700 SSH directory must be private
id_rsa rw------- 600 Private key must be owner-only
id_rsa.pub rw-r--r-- 644 Public key can be readable
authorized_keys rw------- 600 Controls access to server
known_hosts rw-r--r-- 644 Can be readable by user
Quick Setup - SSH Permissions
# Set correct permissions for SSH directory
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
Security Requirement: SSH will reject connections if private key permissions are too open. You'll see an error like "WARNING: UNPROTECTED PRIVATE KEY FILE!"
Read (4) Write (2) Execute (1) Octal
Owner (u) 7
Group (g) 5
Others (o) 5
Special:
Presets:
ls -l
-rwxr-xr-x 1 user group
Octal command
chmod 755 filename
Symbolic command
chmod u=rwx,g=rx,o=rx filename
Breakdown
Click checkboxes or type octal/symbolic values — everything syncs in real-time
Use preset buttons for common permission values like 644 or 755
Toggle File/Directory to see how permissions display in ls -l output
Enable special permissions (Setuid, Setgid, Sticky) for 4-digit octal values
All calculations happen locally in your browser
Want to learn more? Read documentation →
1/6
Start typing to search...
Searching...
No results found
Try searching with different keywords