Chmod Calculator

Visual generator for Linux/Unix file permissions (chmod).

Role
Read (4)
Write (2)
Execute (1)
Owner
Group
Public

Mastering Linux File Permissions with Chmod

In Unix-like operating systems such as Linux and macOS, file security is managed through a permission system known as **chmod** (change mode). Every file and directory has three associated permission sets: for the **Owner** (you), the **Group** (your team), and the **Public** (everyone else).

Understanding the Values

Permissions are often represented in two ways: **Symbolic** (rwx) and **Octal** (numbers). The octal method sums up the values of active permissions:

  • Read (r) = 4: Allows viewing the file contents or listing directory files.
  • Write (w) = 2: Allows modifying file content or deleting files within a directory.
  • Execute (x) = 1: Allows running the file as a script/program or accessing a directory.

For example, 7 (4+2+1) means Read, Write, and Execute. 5 (4+1) means Read and Execute. 0 means no permissions.

Common Permission Presets

  • 777 (rwxrwxrwx): Everyone can read, write, and execute. ⚠️ Highly insecure. Use with caution.
  • 755 (rwxr-xr-x): Owner has full access; others can only read and execute. Standard for scripts and public web directories.
  • 644 (rw-r--r--): Owner can read/write; others can only read. Standard for configuration files and documents.
  • 600 (rw-------): Only the owner can read and write. Used for sensitive SSH keys or config files.

How to Use This Calculator

Simply toggle the checkboxes above to set the desired permissions for each role. The tool automatically generates the `chmod` command (e.g., `chmod 755 filename`) you can paste directly into your terminal. This prevents manual calculation errors, ensuring your server files are secure.