UNDERSTAND EVERY PERMISSION BIT

Chmod Calculator.

Turn Linux permissions into numbers you can read. Toggle read, write and execute — or edit octal and rwx directly.

PERMISSION BUILDERCalculated in your browser
Start with

01Choose permissions

PermissionOwneruGroupgOtherso
Readr = 4
Writew = 2
Executex = 1
Octal value755
Special bits optional

02Read or edit the result

Three permission digits; a fourth digit sets special bits.

Paste rwxr-xr-x or a permission field such as drwxr-xr-x.

OwnerrwxRead + Write + Execute
Groupr-xRead + Execute
Othersr-xRead + Execute

03Use the command

chmod 755 -- 'path/to/file'

The path is quoted literally. Replace it with your target; this tool does not run commands.

Mode bits only, not an effective-access check. GNU chmod can preserve existing directory setuid/setgid bits with short numeric modes. Details below.

A Linux permissions calculator you can edit three ways

Choose read, write and execute for the owner, group and others, or start with a mode you already have. The chmod calculator converts each valid change into an octal number and a symbolic permission string. Use it to decode a deployment instruction, check a script’s execute bit or understand a file listing before changing permissions.

  1. Select permissions in the matrix, enter a three- or four-digit octal value, or paste an rwx permission field.
  2. Review the three classes. The per-class totals and permission breakdown show what you selected. Special bits have their own controls.
  3. Set the target path and copy. The generated command quotes the path as one literal shell argument. Replace the example path with the actual file or directory before running it.

Invalid input is explained inline. While you correct it, the selection stays at the last valid mode and command copying is disabled. Choosing a preset or a checkbox starts a valid selection again.

Why read = 4, write = 2 and execute = 1

Each permission class has three independent bits. Adding their values gives a digit from zero to seven. The digits appear in owner–group–others order: in 754, the owner gets 7 = 4 + 2 + 1, the group gets 5 = 4 + 1, and others get 4.

Octal digitrwxPermissions
0---None
1--xExecute / search
2-w-Write
3-wxWrite + execute / search
4r--Read
5r-xRead + execute / search
6rw-Read + write
7rwxRead + write + execute / search

The optional leading digit records setuid, setgid and sticky, using the same 4–2–1 addition. For example, 4755 adds setuid to 755. A leading zero in 0755 represents no special bits in the calculated mode. See the directory caveat below when applying numeric modes with GNU chmod.

Common chmod values, with their meaning

These examples illustrate different access needs. They are starting points for understanding a mode, not universal settings for every server or application.

ModePermission stringExample use
644rw-r--r--Readable regular file
Owner can edit; group and others can read. No execute bits are set.
755rwxr-xr-xDirectory or executable script
Owner has all three bits; group and others can read and execute/search.
600rw-------Owner-only file
Only the owner has ordinary read/write permissions. Useful when a file should not be readable by the group or others.
700rwx------Owner-only directory
Owner can list, modify and search the directory; group and others have no mode-bit permissions.
2775rwxrwsr-xGroup collaboration directory
Group has write and search; setgid can make new entries inherit the directory group on Linux.
1777rwxrwxrwtShared temporary directory
Everyone has directory access, with the sticky bit restricting who may remove or rename entries.
chmod 644 -- 'report.txt'
chmod 755 -- 'deploy.sh'
chmod 700 -- 'private-directory'

Numeric modes replace ordinary permission bits rather than adding to the existing selection. If the only intended change is giving the owner execute permission, a relative command such as chmod u+x -- 'deploy.sh' can express that narrower edit. Relative chmod expressions are explained here but are not parsed by the calculator.

Read, write and execute mean different things on directories

For a regular file, the bits refer to reading content, modifying content and executing it. On a directory, read permits listing names, write governs changes to entries, and execute permits searching or traversing it. Useful entry operations generally also need directory search permission.

A directory set to 644 has no search bits, so it is not equivalent to a readable regular file with the same number. Deleting a file is primarily controlled by its parent directory permissions and relevant restrictions, rather than by that file’s write bit alone.

The kernel checks the applicable access class; owner, group and others are not simply combined into one grant. Parent directories, ACLs, mount options, capabilities and security policy can also affect an operation. This Linux permissions calculator does not evaluate those conditions. See Linux pathname resolution for directory traversal details.

Setuid, setgid and the sticky bit

On executable files, setuid and setgid can affect the identity used during execution, subject to operating-system rules. On Linux directories, setgid is used for group inheritance. The sticky bit on a directory restricts removal and renaming of entries to authorized owners or privileged users, even when the directory is writable by others.

In symbolic notation, these flags share the execute positions. rws means owner execute plus setuid; rwS has setuid without owner execute. The same distinction applies to group s/S and others t/T. A special bit does not silently add an execute permission in this calculator.

Applying a mode to a directory: GNU chmod may preserve existing directory setuid and setgid bits when given a numeric mode of four or fewer digits, including 0755. To explicitly clear them, GNU documents forms such as chmod 00755 -- 'directory'. The calculator accepts three or four digits as permission values; it does not simulate existing filesystem state. Read GNU’s directory special-bit rules and the chmod manual before relying on special-bit behavior.

Chmod calculator questions

How do I convert rwx permissions to an octal number?

Split the nine characters into owner, group and others. In each triplet, add 4 for r, 2 for w and 1 for x. A dash adds zero. For example, rwxr-xr-- becomes 754. You can paste the permission string into this calculator to update the checkboxes and octal value.

What is the difference between chmod 644 and chmod 755?

644 gives the owner read and write access, and gives the group and others read access. 755 adds execute for all three classes. For a directory, execute means search or traversal; for a regular file, it is the execute permission bit. Choose according to what the file or directory needs.

Can I paste permissions from ls -l?

Yes. Paste the nine permission characters, or the ten-character field with a recognized file-type prefix, such as -rw-r--r-- or drwxr-xr-x. The type prefix is ignored; it does not change the file type. Remove any trailing ACL or security-context marker and the rest of the listing. chmod expressions such as u+x are not input formats for this tool.

What do uppercase S and T mean?

S means setuid or setgid is set while the corresponding execute bit is unset. T means the sticky bit is set without execute for others. Lowercase s and t indicate that both the special bit and the corresponding execute bit are set. The calculator preserves this distinction.

Is chmod 777 a good fix for Permission denied?

777 grants read, write and execute to every permission class. That is often broader than the operation requires. Check ownership, the relevant class, directory search permissions and any additional access controls before changing the mode. The calculator shows mode bits, not a diagnosis of effective access.

Does this calculator change permissions on my server?

No. It calculates values in your browser and prepares a command for you to copy. It does not connect to a server, inspect a filesystem or execute chmod. The command targets one literal path and does not include recursive options.

Is chmod the same as umask?

No. chmod changes the mode of an existing filesystem object. A process umask removes permissions from the mode requested when an object is created, subject to filesystem and default ACL behavior. This page is a chmod mode calculator, not a umask calculator.

Return to the permission calculator →