ToolNimba

๐Ÿ” Chmod Calculator: Octal and Symbolic File Permissions

Shihab Mia By Shihab Mia ยท Updated 2026-06-30

Class Read (4) Write (2) Execute (1)
Owner
Group
Other
Octal
755
Symbolic
rwxr-xr-x

chmod 755 file

Tick the boxes or type an octal value to begin.

A chmod calculator converts file permissions between three views: the checkboxes you tick, the octal number (like 755), and the symbolic string (like rwxr-xr-x). To get an octal value, add read (4), write (2), and execute (1) for each class, then place the digits in owner, group, other order. So rwx is 4+2+1=7 and r-x is 4+1=5, which makes rwxr-xr-x equal to 755. This chmod calculator works both ways: tick the boxes to read off the number, or type a number and the boxes update, giving you the exact chmod command to copy and run.

What is the Chmod Calculator?

On Unix, Linux, and macOS every file and directory carries permissions that decide who may read it, write to it, or run it. Permissions are split across three classes: the owner (the user who owns the file), the group (a set of users who share access), and other (everyone else on the system). Each class has three independent bits: read (r), write (w), and execute (x). That is nine bits in total, which is exactly why a permission string looks like rwxr-xr-x. A chmod calculator simply turns those nine on or off boxes into the two notations the system understands.

The chmod command (short for change mode) sets these bits. The most compact way to express them is octal, where each class collapses into a single digit from 0 to 7. The rule a chmod calculator applies is fixed: read is worth 4, write is worth 2, and execute is worth 1, and you add the values that are switched on. So rwx is 4 plus 2 plus 1, which is 7, and r-x is 4 plus 1, which is 5. Stack the three digits in owner, group, other order and 755 means rwxr-xr-x. This addition never changes, which is what makes the conversion reliable and instant.

The symbolic form, the rwxr-xr-x string, is what you see in a long directory listing from ls -l. It carries exactly the same information as the octal number, shown as letters instead of digits, with a dash standing for a permission that is switched off. Reading symbolic notation is easy once you group it in threes: the first three letters are the owner, the next three are the group, and the last three are other. A chmod calculator lets you paste that string and instantly see the matching number, so you never have to do the mental arithmetic under pressure.

Knowing both notations matters because they suit different moments. Octal is fast to type into a chmod command, which is why scripts and documentation almost always use numbers like chmod 644 file. The symbolic string is easier to scan when you are auditing a directory and checking what is actually allowed. A good chmod calculator removes the friction between the two so you can move from a listing to a command without errors. The most common safe defaults are 644 for regular files such as web pages and 755 for directories and executable scripts.

There is also a symbolic chmod syntax that adds or removes single bits without touching the rest, such as chmod u+x file to make a file executable for its owner, or chmod go-w file to remove write access from group and other. This relative form is handy for quick edits, while the octal form is best when you want to set the full permission set in one shot. Whichever style you prefer, a chmod calculator helps you verify the result before you run anything, so you avoid the classic mistake of locking yourself out of a file or leaving it wide open.

One extra layer worth knowing is the special permission bits that sit in front of the three regular digits: setuid (4), setgid (2), and the sticky bit (1). They appear as a fourth, leading octal digit, so chmod 1777 on a shared folder like /tmp sets the sticky bit so users can only delete their own files. Most everyday work needs only the three standard digits, and this chmod calculator focuses on those, but it is useful to recognise a four digit value when you meet one.

When to use it

  • Working out the octal number to pass to chmod when you only know which boxes you want ticked.
  • Reading a symbolic string like rwxr-xr-x from an ls -l listing and turning it back into a number.
  • Setting safe web permissions, such as 644 for pages and 755 for folders and scripts.
  • Locking down sensitive files, for example 600 for an SSH private key so only the owner can read it.
  • Teaching or learning how Unix permissions map between letters and numbers without memorising tables.
  • Double-checking a permission value before running chmod on a production server to avoid lockouts.

How to use the Chmod Calculator

  1. Tick the read, write, and execute boxes you want for the owner, the group, and other.
  2. Read off the octal value (for example 755) and the symbolic string (for example rwxr-xr-x).
  3. Or type an octal value into the box and watch the checkboxes update to match.
  4. Copy the ready-made chmod command and run it against your file or folder.

Formula & method

Each class digit = (read ? 4 : 0) + (write ? 2 : 0) + (execute ? 1 : 0).   Octal = owner digit, then group digit, then other digit. So rwx = 4+2+1 = 7 and r-x = 4+0+1 = 5, which makes rwxr-xr-x = 755.
How chmod 755 Is Builtread = 4, write = 2, execute = 1 (add the ones that are on)OwnerGroupOtherr (4) + w (2) + x (1)r (4) + x (1)r (4) + x (1)755rwxr-xr-xchmod 755 = rwxr-xr-xOrder is always owner, then group, then other

Worked examples

You want the owner to read, write, and run a script, while group and other may read and run it.

  1. Owner rwx = 4 + 2 + 1 = 7
  2. Group r-x = 4 + 0 + 1 = 5
  3. Other r-x = 4 + 0 + 1 = 5
  4. Combine the digits in owner, group, other order: 755

Result: Octal 755, symbolic rwxr-xr-x, command chmod 755 file

A plain web page that everyone may read but only the owner may edit.

  1. Owner rw- = 4 + 2 + 0 = 6
  2. Group r-- = 4 + 0 + 0 = 4
  3. Other r-- = 4 + 0 + 0 = 4
  4. Combine the digits: 644

Result: Octal 644, symbolic rw-r--r--, command chmod 644 file

Reading the string rw------- from a listing and turning it back into a number.

  1. Split into three groups: rw- (owner), --- (group), --- (other)
  2. Owner rw- = 4 + 2 + 0 = 6
  3. Group --- = 0 and Other --- = 0
  4. Combine the digits: 600

Result: Octal 600, symbolic rw-------, command chmod 600 file (typical for a private key)

Permission bit values

PermissionLetterOctal value
Readr4
Writew2
Executex1
No access-0

Common chmod values and what they mean

OctalSymbolicTypical use
755rwxr-xr-xFolders and scripts: owner full, others read and run
644rw-r--r--Regular files like web pages and documents
600rw-------Private files such as SSH keys, owner only
700rwx------Private folders and scripts, owner only
664rw-rw-r--Files a group can edit, others read only
640rw-r-----Owner edits, group reads, other no access
775rwxrwxr-xShared folders a group can write to
777rwxrwxrwxFull access for everyone (rarely a good idea)

How each octal digit maps to letters

DigitBits (r w x)Symbolic
0off off off---
1off off on--x
2off on off-w-
3off on on-wx
4on off offr--
5on off onr-x
6on on offrw-
7on on onrwx

Common mistakes to avoid

  • Using 777 by default. Setting 777 gives every user full read, write, and execute access. It often hides a real ownership problem and is a serious security risk, especially on a web server. Prefer 755 for folders and 644 for files, and fix ownership with chown if access is still wrong.
  • Confusing the digit order. The three digits are always owner, then group, then other. Writing 745 when you meant 754 silently changes who can do what, so double-check the order in this chmod calculator before running the command.
  • Forgetting that folders need execute. On a directory the execute bit means the right to enter it and reach its contents. A folder set to 644 cannot be opened, so directories usually need 755 rather than 644 even though they are not programs.
  • Adding execute to data files that do not need it. Plain files like images, text, or HTML do not need the execute bit. Marking them executable adds nothing useful, can trip security scanners, and makes audits noisier, so 644 is the right choice for them.
  • Forgetting -R changes everything underneath. Running chmod -R 755 on a tree applies 755 to files too, which can leave data files needlessly executable. Use find to apply 644 to files and 755 to directories separately, instead of one recursive value.
  • Confusing permissions with ownership. chmod controls what each class may do, but not who is in each class. If the right person still cannot access a file after chmod, the owner or group is probably wrong, which is a job for chown, not chmod.

Glossary

chmod
The Unix command, short for change mode, that sets the read, write, and execute permissions on a file or directory.
Octal notation
A base-8 way of writing permissions where each class is one digit from 0 to 7, formed by adding read (4), write (2), and execute (1).
Symbolic notation
The letter form of permissions, such as rwxr-xr-x, where a dash means the permission is switched off.
Owner, group, other
The three permission classes: the user who owns the file, a group of users, and everyone else on the system.
Execute bit
On a file it allows the file to be run as a program; on a directory it allows the directory to be entered and its contents accessed.
umask
A setting that subtracts permission bits from the default when new files are created, so it decides the starting permissions before any chmod.
chown
The command that changes which user and group own a file, controlling who falls into the owner and group classes.
Sticky bit
A special permission (the 1 in a leading digit like 1777) on a shared directory that lets users delete only their own files.

Frequently asked questions

What does chmod 755 mean?

chmod 755 gives the owner read, write, and execute (the 7), and gives the group and other read and execute (the two 5s). In symbolic form that is rwxr-xr-x. It is the standard setting for directories and scripts that everyone may read and run but only the owner may change.

How is the octal permission number calculated?

Each class (owner, group, other) becomes one digit. Add 4 for read, 2 for write, and 1 for execute for the permissions you want on. So rw- is 4 plus 2, which is 6, and rwx is 4 plus 2 plus 1, which is 7. Place the three digits in owner, group, other order to get a value like 644 or 755.

What is the difference between 644 and 755?

644 (rw-r--r--) lets the owner read and write while others can only read, which suits regular files. 755 (rwxr-xr-x) adds the execute bit for everyone, which directories and scripts need so they can be entered or run. Use 644 for files and 755 for folders as a safe default.

Is chmod 777 safe?

Usually not. 777 grants every user full read, write, and execute access, which on a shared system or web server is a real security risk. It often masks an ownership problem that chown would fix. Use the least access that works, typically 755 for folders and 644 for files.

What does the execute bit do on a folder?

On a directory the execute bit means the right to enter it and reach the files inside, rather than the right to run it as a program. That is why directories normally need execute permission, for example 755, even though they are not executable code.

How do I convert a symbolic string like rwxr-xr-x back to a number?

Read the string in three groups of three. For each group, add 4 for r, 2 for w, and 1 for x, treating each dash as 0. So rwxr-xr-x becomes 7, 5, 5, which is 755. This chmod calculator does the conversion in both directions automatically.

What is chmod 600 used for?

chmod 600 (rw-------) lets only the owner read and write a file, with no access for group or other. It is the recommended permission for sensitive files such as SSH private keys, because many tools refuse to use a private key that is readable by anyone else.

What is the difference between chmod and chown?

chmod sets what each class (owner, group, other) is allowed to do with a file. chown sets which user and group actually own the file, deciding who belongs to those classes. If the right person still cannot access a file after chmod, the owner or group is usually wrong and needs chown.

How do I make a file executable?

Add the execute bit. The quickest symbolic way is chmod +x file to make it executable for everyone, or chmod u+x file for just the owner. In octal you would typically use chmod 755 file for a shared script or chmod 700 file for a private one.

Does chmod work on Windows?

Native Windows uses its own access control lists rather than Unix permission bits, so chmod has no effect there. However chmod works inside the Windows Subsystem for Linux (WSL), in Git Bash, and over SSH to a Linux or macOS server, which is where these octal values apply.