Developer Tools

Linux Permission Calculator

Calculate Linux file permissions by converting between octal and symbolic modes. Build chmod commands, understand read, write, and execute permissions, and configure special permission bits.

Copy-Ready Commands Special Permission Bits Octal & Symbolic Conversion Free to Use

Permission bits

User classRead 4Write 2Execute 1Value
Owner u7
Group g5
Others o5
Special permissions

Convert permissions

Enter 3 or 4 digits, each from 0 to 7.
Enter 9 permission characters, optionally preceded by a file-type character such as - or d.
Octal755
Symbolicrwxr-xr-x

Generate chmod command

chmod 755 filename
chmod u=rwx,g=rx,o=rx filename

This tool generates commands only. It does not execute them or change permissions on your system. Review a command before running it, especially when using recursive permissions.

How to Calculate Linux File Permissions

Use this Linux permission calculator to convert between octal and symbolic file permissions, understand access for owners, groups, and other users, and generate a chmod command. Select individual permission bits or enter an existing permission mode to see its equivalent format.

How to Use the Linux Permission Calculator

  1. Choose the basic permissions. Select Read, Write, and Execute for the file owner, group, and other users.
  2. Set special permission bits if needed. Use Setuid, Setgid, or Sticky Bit when the intended file or directory behavior requires them.
  3. Enter an existing permission mode. Type a three-digit or four-digit octal value, such as 755 or 4755, or enter a symbolic mode such as rwxr-xr-x.
  4. Review the converted results. Check the octal value and symbolic representation before using them.
  5. Generate a command. Enter a file or directory path, review the generated chmod command, and copy it if appropriate.

Understanding Linux Permission Values

Standard Linux permissions use three basic bits: read, write, and execute. Each bit has an octal value. Adding the enabled values produces a digit from 0 to 7.

PermissionSymbolOctal valueMeaning
No permission---0No read, write, or execute permission
Execute--x1Execute a file or access a directory when other requirements are met
Write-w-2Write access, subject to the type of resource and other system rules
Write and execute-wx3Write and execute permissions
Readr--4Read access
Read and executer-x5Read and execute permissions
Read and writerw-6Read and write permissions
Read, write, and executerwx7All three basic permission bits are enabled

Owner, Group, and Others

A standard octal permission mode contains three digits. The first digit represents the file owner’s permissions, the second represents the owning group’s permissions, and the third represents permissions for other users.

For example, 754 means:

  • Owner — 7 (rwx): read, write, and execute.
  • Group — 5 (r-x): read and execute.
  • Others — 4 (r--): read only.

Its symbolic representation is rwxr-xr--.

Common Linux Permission Examples

Octal modeSymbolic modeTypical use
644rw-r--r--A regular file readable by the owner, group, and others, with write permission for the owner
755rwxr-xr-xA file or directory where the owner has full basic permissions and group and others have read and execute permissions
600rw-------A file with read and write permissions for the owner only
700rwx------A file or directory with basic permissions assigned only to the owner
775rwxrwxr-xOwner and group have full basic permissions; others have read and execute permissions
777rwxrwxrwxAll basic permissions are enabled for owner, group, and others; use only when the access implications are understood

Special Linux Permission Bits

A four-digit octal mode can include a leading digit for special permission bits. The leading digit combines Setuid, Setgid, and Sticky Bit values.

Special bitOctal valueCommon symbolic notationGeneral purpose
Setuid4000s or S in the owner’s execute positionOn applicable executable files, affects the effective user ID when executed
Setgid2000s or S in the group’s execute positionOn applicable executable files, affects the effective group ID; on directories, commonly supports group inheritance
Sticky Bit1000t or T in the others’ execute positionOn directories, restricts removal or renaming of entries under the applicable ownership and privilege rules

For example, 4755 combines Setuid with the basic permissions 755. Its symbolic representation is rwsr-xr-x. The lowercase s appears when the corresponding execute bit is also enabled; uppercase S indicates that the special bit is set while that execute bit is disabled. The same lowercase-versus-uppercase distinction applies to t and T for the Sticky Bit.

Generating a chmod Command

The chmod command changes file or directory permission bits on a Linux or Unix-like system when run with sufficient privileges. This calculator generates a command for you to review; it does not run the command or modify files.

For example, to set permissions to 755 for a file named script.sh:

chmod 755 script.sh

The equivalent symbolic command is:

chmod u=rwx,g=rx,o=rx script.sh

Use the actual path to your file or directory. Review the target and permissions carefully before running a generated command.

Important Limitations and Safety Notes

  • Permissions are not the whole access-control system. Ownership, ACLs, mount options, security policies, and other system rules can affect effective access.
  • File and directory permissions have different effects. For directories, read generally controls listing names, write relates to modifying directory entries, and execute allows traversal when other requirements are met.
  • Recursive changes can affect many files. The -R option applies changes recursively. Check the path and intended result before running a recursive command.
  • Generated commands are not executed here. Copying a command does not change the permissions on your system.

Frequently Asked Questions

What does a Linux permission calculator do?

A Linux permission calculator converts between octal permission values, such as 755, and symbolic modes, such as rwxr-xr-x. It can also help you understand permission bits and generate a chmod command for review.

What is the difference between octal and symbolic permissions?

Octal permissions use digits from 0 to 7 for each user class, while symbolic permissions use letters such as r, w, and x. For example, 755 is equivalent to rwxr-xr-x.

What do the three digits in chmod 755 mean?

The first digit applies to the owner, the second to the group, and the third to others. In 755, the owner has read, write, and execute permissions (7); the group and others have read and execute permissions (5).

What do the numbers 4, 2, and 1 mean in Linux permissions?

The value 4 represents read, 2 represents write, and 1 represents execute. Add the values of the enabled permissions to calculate each octal digit. For example, read plus execute equals 5.

What is the difference between chmod 644 and chmod 755?

Mode 644 gives the owner read and write permissions, while the group and others receive read permission. Mode 755 gives the owner read, write, and execute permissions, while the group and others receive read and execute permissions. The appropriate mode depends on the file or directory and its purpose.

What do Setuid, Setgid, and the Sticky Bit mean?

These are special permission bits. Setuid can affect the effective user ID when an applicable executable runs. Setgid can affect the effective group ID of an applicable executable and can support group inheritance on directories. The Sticky Bit on directories restricts who can remove or rename entries under applicable system rules.

Does this calculator change permissions on my Linux system?

No. The calculator converts permission values and generates commands for you to review and copy. You must run an appropriate chmod command on your system to apply a change.

What does chmod -R do?

The -R option applies a permission change recursively to a directory and its contents. Use it carefully because the command can affect many files and subdirectories. Verify the target path and intended permissions before executing it.

Is chmod 777 safe to use?

Not as a general default. Mode 777 grants read, write, and execute permissions to the owner, group, and others. This can expose files or directories to unwanted changes or access. Choose permissions based on the actual access requirements instead.