Security Tools

Chmod Calculator

Convert between symbolic and octal Unix permissions.

beginner5 minRuns in your browser

Interactive workspace

Inputs stay on your device — nothing is sent to our servers unless you choose to share.

Client-side only

Octal

755

Symbolic

rwxr-xr-x

Safe default
Live sync

Permission matrix

ClassReadWriteExecuteOctal
owner7
group5
other5

Special bits

owner

rwx

7

File owner (user who created the file)

group

r-x

5

Users in the file's group

other

r-x

5

Everyone else on the system

chmod command

chmod 755 /var/www/html/index.html

Common use cases

Reading permissions

Three digits = owner · group · other. Each digit sums read (4) + write (2) + execute (1). A fourth digit adds setuid (4), setgid (2), or sticky (1) — e.g. 4755 for a setuid root binary.

On web servers, directories are typically 755 and files 644. Never leave uploads or config files world-writable.
Calculations run entirely in your browser — nothing is sent to a server.

Documentation

How to use this tool, practical use cases, and technical notes.

The Chmod Calculator provides three synchronized input modes — visual checkboxes, octal input, and symbolic input — all of which update in real time when any value changes. Here is a complete walkthrough of every feature.


Interface Overview

The tool workspace contains five main areas:

Area

Purpose

Quick Presets

One-click buttons for the 8 most common permission values

Octal Input

Type or edit a 3- or 4-digit octal value directly

Symbolic Display

Shows the symbolic equivalent, updates live

Permission Matrix

Visual checkbox grid for owner/group/other × read/write/execute

Special Bits

Toggle setuid, setgid, and sticky bit independently

chmod Command

Live-generated command with configurable target path


Method 1 — Using Quick Presets

The fastest way to get a permission value. The tool ships with 8 preset buttons covering the most commonly used permission values:

Preset

Octal

Symbolic

Typical Use

Button 1

755

rwxr-xr-x

Directories and web server executables

Button 2

644

rw-r--r--

Standard web files (HTML, CSS, PHP)

Button 3

600

rw-------

SSH keys, .env files, private credentials

Button 4

700

rwx------

Owner-only scripts and private directories

Button 5

775

rwxrwxr-x

Shared team directories

Button 6

664

rw-rw-r--

Collaborative files (owner + group write)

Button 7

777

rwxrwxrwx

World-writable (use only when necessary)

Button 8

4755

rwsr-xr-x

Setuid executables

Click any preset to instantly populate all three representations and update the generated chmod command.


Method 2 — Using the Octal Input

Type a permission value directly into the Octal field. The tool accepts:

  • 3-digit values (e.g., 755, 644, 600) — standard permissions

  • 4-digit values (e.g., 4755, 2644, 1777) — special bits in the leading digit

As you type, the symbolic display and visual matrix update character by character. Valid values range from 000 to 7777.

Octal digit quick reference:

Digit

Binary

r

w

x

Meaning

0

000

No permissions

1

001

Execute only

2

010

Write only

3

011

Write + execute

4

100

Read only

5

101

Read + execute

6

110

Read + write

7

111

Full permissions


Method 3 — Using the Visual Permission Matrix

The permission matrix is the most intuitive input method. It presents a grid of checkboxes organized by class (owner, group, other) and permission type (read, write, execute):

         Read   Write   Execute
Owner    [ ]    [ ]     [ ]       → Octal digit 1
Group    [ ]    [ ]     [ ]       → Octal digit 2
Other    [ ]    [ ]     [ ]       → Octal digit 3

Check or uncheck any box to toggle that bit. The octal value, symbolic string, and chmod command update instantly. This method is best for learning the relationship between individual bits and the resulting permission value.


Method 4 — Setting Special Bits

Below the main matrix, three toggle switches control the special bits:

Toggle

Octal Prefix

What It Does

Setuid (4)

+4000

Adds setuid bit — file executes with owner's UID

Setgid (2)

+2000

Adds setgid bit — file runs with group GID; directories inherit group

Sticky (1)

+1000

Adds sticky bit — only owners can delete files in the directory

The leading fourth octal digit is calculated as the sum of enabled special bits:

  • Setuid only → 4xxx

  • Setgid only → 2xxx

  • Sticky only → 1xxx

  • Setuid + Setgid → 6xxx

  • All three → 7xxx


Generating and Copying the chmod Command

The chmod command section at the bottom of the tool generates a ready-to-use shell command:

chmod 755 /var/www/html/index.html

To customize the target path:

  1. Click the Target path field

  2. Type your actual file or directory path (e.g., /etc/nginx/nginx.conf, ~/.ssh/id_rsa, /opt/myapp/)

  3. The command updates live

Three copy buttons let you grab exactly what you need:

Button

What It Copies

Example

Copy octal

Just the octal value

755

Copy symbolic

The symbolic string

rwxr-xr-x

Copy command

Full chmod command

chmod 755 /path/to/file


Step-by-Step Example: Securing an SSH Private Key

SSH private key files must have permission 600 (rw-------) or they will be rejected by the SSH client with a "permissions are too open" warning.

  1. Click the 600 preset button, or type 600 in the Octal field

  2. Verify the symbolic display shows rw-------

  3. Confirm the matrix: owner has Read + Write checked; Group and Other have nothing checked

  4. Enter your key path in the target field: ~/.ssh/id_rsa

  5. Click Copy commandchmod 600 ~/.ssh/id_rsa

  6. Paste and run in your terminal


Resetting the Tool

Click the Reset button to return all fields to the default state (755 / rwxr-xr-x). This clears any custom path entry as well.