Linux & DevOps GUIDE

Linux chmod Permissions Explained

Translate owner, group, and other permissions between numeric modes and symbolic strings.

Updated About 4 min read
Open chmod Calculator

Read the three permission groups

Linux file permissions commonly describe access for the file's owner, its group, and everyone else. Each class has read (r), write (w), and execute (x) bits. A missing permission is shown as -. The nine-character string rwxr-xr-x therefore means the owner has all three permissions, while the group and other users have read and execute.

CyberClutch's chmod Calculator converts these ordinary permission bits between a nine-character symbolic string and a three-digit numeric mode. It does not connect to a machine or change files. Use it to understand a proposed mode before applying a change on a system you administer.

Convert permissions into octal digits

Each permission contributes a value within one class:

PermissionValueMeaning for a regular file
Read (r)4Read the file contents
Write (w)2Modify the file contents
Execute (x)1Attempt to execute the file as a program
Missing (-)0That bit is unset

Add the selected values for each class separately. rwx is 4 + 2 + 1 = 7; r-x is 4 + 1 = 5; rw- is 4 + 2 = 6. Place owner, group, and others in that order. Thus rwxr-xr-x becomes 755, while rw-r--r-- becomes 644.

These digits are octal permission values, not a decimal percentage or a security score. The same numeric mode can be appropriate for one file and inappropriate for another because ownership, content, and the application's needs differ.

Compare common modes

755: shared read and execute

755 maps to rwxr-xr-x. It is common for directories that users need to traverse and for executable programs intended to be run by other users. It is not a suitable default for a private credential file: everyone can read a regular file with this mode.

644: owner writes, others read

644 maps to rw-r--r--. It is common for non-sensitive text files that other users or services need to read. It does not allow other users to write the file, but it still exposes its contents to readers who can reach it through the parent directories.

700: owner-only access

700 maps to rwx------. It can fit a private directory or executable used only by its owner. A service running under a different user will not automatically gain access. For a private regular file that should not be executable, consider whether 600 better describes the intended bits.

Directories interpret the bits differently

Read permission on a directory permits listing its entries. Execute permission permits searching or traversing it to reach named entries. Write permission, combined with the necessary traversal permission, permits changing directory entries such as creating or removing names. Deleting a file therefore depends strongly on the containing directory's permissions, not just the file's write bit.

This is why changing a directory to 644 can break access even though it appears readable. Users may lack the execute bit needed to traverse it. Parent directory permissions, access control lists, and security policies can further affect effective access.

Use the calculator safely

  1. Select symbolic-to-numeric mode to enter a nine-character string such as rw-r--r--.
  2. Select numeric-to-symbolic mode to enter three digits such as 755.
  3. Choose Calculate permissions and review the converted result.
  4. Copy the result only after confirming the intended owner, group, and other access.
  5. Apply it to a specific test file on your system and verify with a command such as ls -l.

The calculator's symbolic input is the display string, not a chmod expression such as u+x. It also expects the nine permission characters without the leading file-type character seen in ls -l output.

chmod 644 ./example.conf
chmod 700 ./private-directory
ls -ld ./example.conf ./private-directory

These commands illustrate targeted changes; verify ownership and paths before running them. Avoid using 777 as a routine fix for an application error. World-writable files or directories can permit unwanted modifications, and broad recursive changes can damage a carefully configured tree.

Know the scope of the result

The current calculator covers basic three-digit modes. Special bits such as setuid, setgid, and sticky bits, extended ACLs, ownership changes, and filesystem mount restrictions require separate review. A converted mode does not prove an application is secure or that a process will have effective access.

Use the chmod Calculator to translate the bits, then check the surrounding ownership and directory design before changing permissions in production.

Ready to try it?

chmod Calculator

Translate owner, group, and other permissions between numeric modes and symbolic strings.

Open chmod Calculator

Related tools

Related resources