Chmod Calculator: Octal to Symbolic, Free

Chmod Calculator

Calculate Linux/Unix file permissions visually and get the chmod command.

Entity Read (r)
+4
Write (w)
+2
Execute (x)
+1
Octal
Owner (u)
6
Group (g)
6
Other (o)
6

chmod Command

chmod 644 filename

Numeric

644

Symbolic

-rw-r--r--

Binary

110100100

Common Presets

A chmod calculator turns Linux and Unix file permissions into a number and back again. Tick read, write and execute boxes for the owner, group and everyone else, or type an octal value like 755 or a symbolic string like rw-r--r--, and get the matching command to copy. It is free and needs no sign-in.

What Is chmod and How Do Octal Permissions Work?

The chmod command changes who can read, write or run a file or directory on Linux and Unix systems. Permissions are set for three classes: the owner (u), the group (g) and all other users (o).

Each class gets a number from 0 to 7, built by adding three values: read is 4, write is 2 and execute is 1. Read plus write is 6, read plus execute is 5, and all three add up to 7. Three digits side by side give the full mode, so 754 means the owner has 7, the group has 5 and others have 4.

Symbolic notation

The same mode can be written as nine characters: three for the owner, three for the group, three for others. A letter means the permission is on, and a dash means it is off. So 754 is rwxr-xr--. When you run ls -l, a tenth character appears at the front: a dash for a regular file or a d for a directory.

Binary view

Every permission is one bit, so nine bits describe a whole mode. Mode 644 is 110 100 100 in binary. Seeing the bits makes it clear why each digit can only go from 0 to 7.

How to Use the Chmod Calculator

You can start from checkboxes, an octal number, a symbolic string or a preset, and the other views update to match. Follow these steps:

  1. Look at the starting state. The page opens with 644, which is -rw-r--r--.
  2. Tick or untick the Read (r) +4, Write (w) +2 and Execute (x) +1 boxes in the Owner (u), Group (g) and Other (o) rows. The Octal column shows each row's digit.
  3. Or type three digits from 0 to 7 into the Octal Value field, for example 750.
  4. Or type nine permission characters, such as rwxr-x---, into the Symbolic field. A leading dash for the file type is accepted.
  5. Click a preset for a common mode, such as 755 (Directories / Scripts) or 600 (Private Keys / Config).
  6. Check the Numeric, Symbolic and Binary results, then press Copy to get the chmod command, for example chmod 644 filename.
  7. Paste the command into your terminal and replace filename with your real file or folder name.

Worked Example: Locking Down a Config File

Say a deployment guide tells you the owner should read and write a file, the group should only read it, and everyone else should have no access.

Enter that in the checkboxes. Owner: Read and Write. Group: Read. Other: nothing. The row digits are 6 (4+2), 4 and 0, so the Numeric result is 640. The Symbolic result is -rw-r----- and the Binary result is 110100000. The copied command is chmod 640 filename.

Now check it the other way. Type 640 into Octal Value and the same boxes light up. If you type rw-r----- into Symbolic, you land on 640 again. Getting the same answer from both directions confirms you have the mode you meant.

What Do Common chmod Values Mean?

Most real-world modes come from a short list. This table covers the ones people search for most, and each of them except 775 is also a preset in the calculator.

ModeSymbolicTypical use
644rw-r--r--Web files, documents
755rwxr-xr-xDirectories, scripts
600rw-------Private keys, secrets
700rwx------Private scripts or folders
400r--------Read-only sensitive files
775rwxrwxr-xShared team directories
777rwxrwxrwxFull access (unsafe)

How Do You Read and Act on the Results?

The results tell you exactly who can do what, and the fix for a wrong mode is usually to change one digit.

  • First digit too high: if the owner has more access than needed, drop it. A config file the owner never edits can go from 600 to 400.
  • Last digit above 0 for secrets: any permission for other users on a private key or credentials file is a red flag. Use 600 or 400. SSH, for one, refuses private keys that other users can read.
  • Execute missing on a script: if a script says permission denied, the x bit is off. Add it with 755 or 700.
  • Execute on a plain data file: a 755 on an image or HTML file is unnecessary. Use 644.
  • Any 7 in the last digit: that means everyone can write. Replace it unless you have a deliberate reason.

Files and directories behave differently

On a file, execute means you can run it. On a directory, read lets you list its contents and execute lets you enter it and reach the files inside. A directory without execute is effectively locked, even if it can be read. That is why folders usually need 755 while the files in them need only 644.

How Do You Find the chmod of an Existing File?

Run ls -l filename in your terminal and read the first column, such as -rwxr-xr--. Skip the first character, paste the remaining nine into the Symbolic field and the calculator shows 754. On many Linux systems, stat -c %a filename prints the octal number directly.

Who Is This Useful For?

Anyone who sets permissions by hand will save time and avoid guessing.

  • Web developers fixing 403 or 500 errors after uploading files by FTP or SFTP, where files often arrive with the wrong mode.
  • Server admins checking that a deployment script, cron job or shared folder is set the way a runbook says.
  • Students learning why 7 is rwx and 5 is r-x, using the boxes and the binary line to see the logic.
  • Security reviewers auditing a list of modes and translating rw-rw-rw- into 666 to spot loose settings quickly.

If you generate keys as part of the same job, the CSR generator creates a private key you should then lock down to 600, and the certificate key matcher confirms the key and certificate belong together.

Best Practices and Common Mistakes

Give each file the least access that still lets it work. That one rule prevents most permission problems.

  • Avoid 777. It lets every user read, write and run the file. If something only works with 777, the real problem is usually the file's owner or group, so fix that with chown instead.
  • Be careful with recursive changes. Running chmod -R 755 folder also makes every file inside executable. Set directories and files separately, for example with find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} +.
  • Adding execute only. For the common chmod +x case, tick the Execute boxes you want in the calculator and copy the resulting full mode if you prefer to set everything explicitly.
  • Typing four digits. The Octal Value field wants exactly three digits. A value like 0755 or 8 will show Invalid.
  • Pasting a directory string. A string beginning with d, like drwxr-xr-x, is not accepted. Remove the first character and enter the last nine.
  • Forgetting the filename. The copied command ends in the word filename. Replace it before running, or you will get a no such file error.

Permissions are one layer of protection. For stored passwords, a hash is also needed, and the password encryption utility and bcrypt hash generator cover that side. You can find more related utilities in the security and encryption tools hub.

What Are the Limits of This Calculator?

This calculator covers the standard nine permission bits: read, write and execute for owner, group and other. It does not handle the special bits, which means setuid, setgid and the sticky bit, and it does not accept four-digit modes such as 4755 or 1777. Symbols like s, S, t and T in a string such as drwxr-sr-x are rejected.

It also does not read your real files, check ownership, or account for access control lists, so it cannot tell you what a specific user can actually do. Think of it as an accurate converter and command builder for the common three-digit case.

Use the calculator above to build your next permission string: set the boxes, check the symbolic and binary views, press Copy and paste the command into your terminal.

Frequently Asked Questions

How do you calculate chmod values?
Add 4 for read, 2 for write and 1 for execute for each of owner, group and other, then write the three digits together. Read plus write plus execute is 7, so rwxr-xr-x becomes 755. The chmod calculator does this when you tick its boxes.
What is chmod 755?
Chmod 755 gives the owner read, write and execute, and gives the group and others read and execute only. Its symbolic form is rwxr-xr-x. It is the usual mode for directories and scripts that others need to run but not edit.
What is chmod 600 and when should you use it?
Chmod 600 lets only the owner read and write a file, and gives everyone else nothing. Its symbolic form is rw-------. Use it for private keys, credentials and config files with secrets. The calculator has a 600 preset for private keys and config files.
Is chmod 777 safe?
No, chmod 777 is rarely safe because it lets every user read, write and run the file. Use it only for brief testing in an isolated setup. For web files, 644 and 755 are the normal choices, and ownership fixes are better than opening permissions.
Why does the calculator show Invalid for my value?
The Octal Value field accepts exactly three digits from 0 to 7, and the Symbolic field accepts nine r, w, x or dash characters. Four-digit modes, special bits like s or t, and a leading d are not supported. Remove them and try again.
Can I convert rw-r--r-- to a number with this chmod calculator?
Yes. Type rw-r--r-- into the Symbolic field and the calculator returns 644, with the checkboxes, binary value and copyable command updated. You can include a leading dash for a regular file, as in -rw-r--r--, copied from ls -l output. It works for free with no sign-in.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now