chmod Calculator

Calculate Unix file permissions in octal notation.

Permissions

Owner6
Group4
Others4
Octal644
Symbolicrw-r--r--
Commandchmod 644 file

How to use chmod Calculator

1

Select Permission Types

Check the boxes next to each permission you need. Under the 'Owner', 'Group', and 'Others' columns, tick 'Read (r)', 'Write (w)', and 'Execute (x)' as required. Each section controls permissions for different user types.

2

View Real-Time Octal Output

Watch the octal notation update automatically in the 'Octal Code' field as you select permissions. The four-digit code displays instantly (e.g., 0755, 0644). Copy this value directly from the output box.

3

Copy and Apply to Terminal

Click the 'Copy' button next to the octal code result. Paste the value into your terminal command: chmod [octal-code] [filename]. Press Enter to apply permissions to your file.

4

Decode Existing Permissions

Alternatively, enter an existing octal code (like 755 or 644) in the 'Octal Input' field and click 'Decode'. The calculator automatically checks the correct permission boxes for that value.

Related Tools

Chmod calculator: convert Unix file permissions instantly

Chmod calculator: convert Unix file permissions instantly

Convert between numeric and symbolic Unix file permissions with ToolHQ's chmod calculator. Type 755 and see rwxr-xr-x. Check the boxes and see the number. No data is stored or transmitted.

Chmod (change mode) is the Unix and Linux command that sets who can read, write, or execute a file. Every file and directory on a Unix-based system has three permission sets: one for the owner, one for the group, and one for everyone else. Each set can include read, write, and execute permissions, and the calculator converts between the numeric shorthand and the symbolic notation that appears in file listings.

If you have ever typed chmod 755 and wondered exactly what that means, or seen rwxr-xr-- in a file listing and tried to decode it, this calculator does the conversion instantly in both directions.

Key takeaways

  • Unix permissions have three sets: owner, group, and others; each with read (4), write (2), execute (1)
  • Add the values for each set to get the octal digit: 755 means owner has 7 (rwx), group has 5 (r-x), others have 5 (r-x)
  • The most common web server values are 755 for directories and 644 for files
  • chmod 777 gives everyone full access and is a security risk on any server
  • No data is stored or transmitted, the calculator runs entirely in your browser

How Unix file permissions work

Every file on a Linux or macOS system has three permission categories: owner (user), group, and others (everyone else). Each category gets three possible permissions: read (r), write (w), and execute (x).

In the symbolic notation you see in ls -l output, the nine characters after the file type flag represent these permissions in order: rwxrwxrwx = owner-group-others, with each position either showing the letter (permission granted) or a hyphen (permission denied).

In numeric (octal) notation, each permission has a value:

  • Read = 4
  • Write = 2
  • Execute = 1

You add these values for each category. So rwx = 4+2+1 = 7. r-x = 4+0+1 = 5. rw- = 4+2+0 = 6. r-- = 4+0+0 = 4.

A three-digit number like 755 means: owner has 7 (rwx), group has 5 (r-x), others have 5 (r-x). This is the standard permission for web server directories, the owner can do everything, but everyone else can only read and traverse (execute on a directory means "enter it").

The POSIX standard for file permissions governs these rules, and they apply across Linux, macOS, BSD, and any Unix-based system.


Common chmod values and when to use each

Understanding the handful of common values covers 95% of everyday needs.

Value Symbolic Who can do what When to use
755 rwxr-xr-x Owner: all. Group/Others: read + execute Directories, executable scripts
644 rw-r--r-- Owner: read + write. Group/Others: read only Web server files (.html, .css, .php)
777 rwxrwxrwx Everyone: full access Avoid on servers, serious security risk
600 rw------- Owner: read + write. No one else Private keys, config files with passwords
400 r-------- Owner: read only. No one else SSL certificate keys, read-only configs
666 rw-rw-rw- Everyone: read + write. No execute Shared temp files (rarely recommended)

The Linux man page for chmod documents every option including the special setuid, setgid, and sticky bit modes.

A note on chmod 777: This setting grants full read, write, and execute access to every user on the system, including the web server process and any malicious script that gains access to the filesystem. On a shared hosting server, chmod 777 can allow other users' processes to modify or delete your files. Use it only in isolated development environments, never in production.


How to use ToolHQ's chmod calculator

The calculator works in both directions.

Numeric to symbolic:

  1. Open ToolHQ's chmod calculator.
  2. Type the numeric value into the input field (e.g., 644).
  3. The tool instantly shows the symbolic notation (rw-r--r--) and checks the corresponding permission boxes.
  4. You can see exactly which permissions are active for owner, group, and others.

Symbolic to numeric (using checkboxes):

  1. Check or uncheck the boxes for owner, group, and others.
  2. The numeric value updates in real time.
  3. Copy the value for use in your chmod command.

Reading the result: The calculator shows both the four-character form (-rwx) and the plain description of what each group can do. This makes it easy to verify you have set what you intended before running the command.


Chmod in practice: web servers and SSH keys

Most developers encounter chmod in two contexts: web server file permissions and SSH key setup.

Web server setup: When you deploy a website, directories typically need 755 and files need 644. This lets the web server process (running as www-data or apache) read your files without being able to write to them. Write access should go to the directories your application actually needs to write to (upload folders, cache directories), and only those.

SSH key permissions: If your SSH private key has permissions that are too open, SSH will refuse to use it with the error "WARNING: UNPROTECTED PRIVATE KEY FILE!" The fix is chmod 600 ~/.ssh/id_rsa. The private key needs to be readable only by the owner.

WordPress installation: WordPress requires that its files be writable by the web server for uploads and auto-updates. The typical setup is 755 for directories (like wp-content/uploads) and 644 for PHP files. Giving PHP files 777 is a security vulnerability that allows arbitrary code execution on many server configurations.

Hiroshi, a freelance web developer, had just deployed a client's WordPress site when the contact form stopped sending emails. After checking the logs, he found that the form plugin was trying to write a log file but the directory was chmod 444 (read-only for everyone). He opened ToolHQ's chmod calculator, saw that 755 would give the web server execute access to the directory while keeping files at 644, and ran the two chmod commands. The form started working immediately, and no other permissions were changed.

Check and convert any permission value with ToolHQ's chmod calculator


Understanding the octal math

If you want to calculate a permission value without the calculator, the math is straightforward.

Each permission set (owner, group, others) is a sum of:

  • Read (r) = 4
  • Write (w) = 2
  • Execute (x) = 1

For any three-permission group, you add the values of the ones you want. The maximum is 7 (4+2+1 = rwx). The common combinations:

Symbolic Calculation Octal
rwx 4+2+1 7
rw- 4+2+0 6
r-x 4+0+1 5
r-- 4+0+0 4
-wx 0+2+1 3
-w- 0+2+0 2
--x 0+0+1 1
--- 0+0+0 0

So chmod 754 means owner=7 (rwx), group=5 (r-x), others=4 (r--). The calculator handles this instantly, but knowing the arithmetic helps you verify the result and understand what you are setting.

Ana, a DevOps engineer setting up a new deployment pipeline, needed to document the correct file permissions for her team's runbook. She used ToolHQ's chmod calculator to verify each value, typing in the numeric code and confirming the symbolic output matched what she expected. She pasted both representations into the runbook. New team members could now understand permissions in whichever format they preferred.


Frequently asked questions

What does chmod 755 mean?

Owner has read, write, and execute (7). Group has read and execute (5). Others have read and execute (5). This is the standard permission for web server directories.

What is the difference between chmod 644 and 755?

Both give the owner read+write access, but 644 denies execute to everyone. Use 644 for web files (.html, .php, .css), and 755 for directories and executable scripts.

Why does chmod 777 get flagged as a security risk?

777 gives every user on the system full read, write, and execute access. On a server, this lets any process (including compromised ones) modify or execute your files. Keep permissions as restrictive as the application requires.

Does chmod work on macOS?

Yes. macOS is Unix-based and uses the same chmod command and permission notation as Linux. The calculator works for both systems.

What is the execute permission on a directory?

On a directory, execute means "enter it" or "traverse it." Without execute permission on a directory, you cannot cd into it or access files inside it, even if those files have read permissions themselves.


The short version

Unix file permissions are nine bits organized into three groups (owner, group, others), each representing read (4), write (2), and execute (1). The numeric notation is the sum of those values per group. The most common values for web servers are 755 for directories and 644 for files. chmod 777 is a security risk and should be avoided in production.

ToolHQ's chmod calculator converts in both directions, type a number, see the symbolic notation; check the boxes, see the number. No data is stored or transmitted.

For related developer tools, see the .htaccess generator for Apache server configuration and the hash generator for file integrity verification.

Convert any chmod value instantly, free at ToolHQ