Skip to main content

Unix permissions calculator

Calculate and convert Unix and Linux file permissions. Convert 755 to rwxr-xr-x, manage special bits and copy the matching chmod command.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Convert an existing value

Permissions

ReadWriteExecute
Owner
Group
Others

Special permissions

Results

Octal

Symbolic

chmod command

Was this tool useful?

How does this tool work?

Decode a mode such as 640 or rw-r-----, adjust its permissions and obtain the matching chmod command. The calculator separates owner, group and other users and includes setuid, setgid and sticky bits. Everything stays local and no file is changed. The output describes mode bits, rather than deciding whether a particular user can access a resource: ACLs, ownership, parent directories and system policies also affect the outcome.

Each group has three permissions: read r is worth 4, write w is 2 and execute x is 1. Their sum produces an octal digit from 0 to 7. In 640, the owner receives 4 + 2, the group receives 4 and others receive 0, giving rw-r-----. The first digit represents the owner, not a priority. A missing permission is shown as a hyphen in symbolic notation.

A fourth digit before the ordinary three represents special bits: setuid is 4, setgid is 2 and sticky is 1. Lowercase s or t means the special bit and execute permission are both set. Uppercase S or T means that execute permission is absent at that position. Octal input accepts three or four digits and an optional 0o prefix. Symbolic input accepts nine characters or a ten-character ls mode that includes the file type.

For directories, x permits traversal, r permits listing names and w permits changing directory entries subject to other permissions. Sticky restricts deletion or renaming in shared directories. Directory setgid affects the group of new entries. File setuid behavior depends on the system, file type and mount options. This calculator does not simulate those policies or recursive chmod changes.

How to use this tool

  1. Load the mode

    Enter an octal number or symbolic string and apply it. Relative expressions such as u+x are not accepted complete modes.

  2. Adjust the groups

    Set owner, group and other permissions. Enable a special bit only after checking its effect on your particular resource.

  3. Adapt the command

    Replace file in the suggested command with the intended path, correctly quoted for your shell. No actual path or owner is inspected here.

Use cases

Review configuration access

Inspect 640 to separate group reading from public access. Then confirm that the service account belongs to the intended group.

Prepare a script

Compare 644 and 755 to see which groups gain execute permission. Also check the interpreter and permissions on parent directories.

Read a shared directory mode

Convert 1777 to identify sticky without mistaking it for a general write prohibition. This mode is not a universal recommendation.

Examples

A group-readable private file

640 gives the owner 6, the group 4 and others 0. The generated command uses a placeholder filename.

Input

640

Result

rw-r-----
chmod 640 file

Identify sticky

1777 retains rwx for each group and adds t at the final position. Its effect is particularly relevant to deletion in shared directories.

Input

1777

Result

rwxrwxrwt
chmod 1777 file

Tips and best practices

  • Do not use chmod 777 as an automatic answer to access failures. Identify the group, path or policy actually blocking the operation.
  • A command without -R does not recursively change a tree. Examine the affected files and directories before adding that option.
  • A full ls line contains more than the mode: copy only permission characters, excluding owner, size and filename.

Sources and references

Frequently asked questions

Why might 755 still block my application?

Mode bits are only part of access control. Parent directories, ACLs, process identity and system policies can still prevent the operation.

What is the difference between s and S?

Both indicate setuid or setgid. Lowercase includes execute permission at that position; uppercase means execute is not set.

Can I convert u+x or a-w?

No. Those are relative chmod operations. Symbolic input expects a complete nine-character state such as rwxr-xr-x.

Is the generated command executed?

No. It is text with file as a placeholder target. The browser neither reads nor changes your system’s permissions.

Related tools

Tools similar or complementary to this one.

Similar tools

Create a .gitignore file from presets for your technologies and tools.

DevelopmentUse this tool

Compare two texts line by line and quickly spot additions, deletions and changes.

DevelopmentFeaturedUse this tool

Find a MIME type from an extension or the other way around.

DevelopmentUse this tool