Skip to content
DevToolKit

Chmod Calculator

Calculate Linux file permissions in octal and symbolic notation. Includes support for special bits like SUID, SGID, and the Sticky bit with live terminal previews.

Presets
Read (4)
Write (2)
Execute (1)
Owner (User)
Group
Others (Public)
Special Bits
Shell Preview
$ ls -ld myfile.txt
-rwxr-xr-x 1 user group 4096 Mar 2 12:34 myfile.txt
chmod 0755 myfile.txt

SUID (4)

The program will run with the permissions of the file owner. Often used for sensitive system tools.

SGID (2)

Files created in the directory inherit the group of the parent. Useful for shared team folders.

Sticky (1)

Only the owner of a file (or root) can delete it. Standard for /tmp to prevent users from deleting others' files.

Was this tool helpful?

How to Use

Using the Chmod Calculator is intuitive and provides instant feedback for your Linux file permission needs.

Step-by-Step Guide

  1. Select Permissions: Use the interactive grid to toggle Read, Write, and Execute permissions for the Owner, Group, and Others.
  2. Special Bits: Toggle SUID, SGID, or the Sticky bit if your workflow requires advanced access control.
  3. Verify Notation: Watch as the Octal (e.g., 0755) and Symbolic (e.g., rwxr-xr-x) strings update in real-time.
  4. Copy Command: Customize your filename and click the copy icon to get the exact chmod command for your terminal.

About This Tool

Understanding Unix Permissions

In Linux and Unix-like systems, every file and directory has access rights. These are divided into three scopes: Owner (the creator), Group (users in the file's group), and Others (everyone else on the system).

Each scope can have three types of access: Read (4), Write (2), and Execute (1). The octal digit for a scope is simply the sum of these values. For example, Read + Execute = 4 + 1 = 5.

Why Use This Tool

Why use our calculator?

Manual calculation of bitmasks can lead to security vulnerabilities (like accidentally setting 777). Our tool provides a Live Shell Preview, showing you exactly how the ls -l output will look, ensuring you have the right configuration before you apply it to your server.

FAQ

What does chmod stand for?
chmod stands for 'change mode'. It is a command-line utility used in Unix and Unix-like operating systems to change the access permissions of file system objects (files and directories).
What is the difference between octal and symbolic notation?
Octal notation uses numbers (e.g., 755) to represent permissions, where each digit is the sum of bits for read (4), write (2), and execute (1). Symbolic notation uses letters (e.g., rwxr-xr-x) to represent the same permissions for user, group, and others.
What are special bits (SUID, SGID, Sticky)?
Special bits provide advanced functionality. SUID allows a file to be executed with the permissions of the owner. SGID allows files in a directory to inherit the group of the parent. The Sticky bit restricts file deletion in a directory to the file's owner or root.
What is chmod 777?
chmod 777 gives full read, write, and execute permissions to everyone (owner, group, and others). It is generally considered a security risk and should be used with caution.