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.
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
- Choose the basic permissions. Select Read, Write, and Execute for the file owner, group, and other users.
- Set special permission bits if needed. Use Setuid, Setgid, or Sticky Bit when the intended file or directory behavior requires them.
-
Enter an existing permission mode.
Type a three-digit or four-digit octal value, such as
755or4755, or enter a symbolic mode such asrwxr-xr-x. - Review the converted results. Check the octal value and symbolic representation before using them.
-
Generate a command.
Enter a file or directory path, review the generated
chmodcommand, 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.
| Permission | Symbol | Octal value | Meaning |
|---|---|---|---|
| No permission | --- | 0 | No read, write, or execute permission |
| Execute | --x | 1 | Execute a file or access a directory when other requirements are met |
| Write | -w- | 2 | Write access, subject to the type of resource and other system rules |
| Write and execute | -wx | 3 | Write and execute permissions |
| Read | r-- | 4 | Read access |
| Read and execute | r-x | 5 | Read and execute permissions |
| Read and write | rw- | 6 | Read and write permissions |
| Read, write, and execute | rwx | 7 | All 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 mode | Symbolic mode | Typical use |
|---|---|---|
644 | rw-r--r-- | A regular file readable by the owner, group, and others, with write permission for the owner |
755 | rwxr-xr-x | A file or directory where the owner has full basic permissions and group and others have read and execute permissions |
600 | rw------- | A file with read and write permissions for the owner only |
700 | rwx------ | A file or directory with basic permissions assigned only to the owner |
775 | rwxrwxr-x | Owner and group have full basic permissions; others have read and execute permissions |
777 | rwxrwxrwx | All 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 bit | Octal value | Common symbolic notation | General purpose |
|---|---|---|---|
| Setuid | 4000 | s or S in the owner’s execute position | On applicable executable files, affects the effective user ID when executed |
| Setgid | 2000 | s or S in the group’s execute position | On applicable executable files, affects the effective group ID; on directories, commonly supports group inheritance |
| Sticky Bit | 1000 | t or T in the others’ execute position | On 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.shThe equivalent symbolic command is:
chmod u=rwx,g=rx,o=rx script.shUse 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
-Roption 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.