🐧 Linux Chmod Generator

🔧
Read (4)
Write (2)
Execute (1)
{{ getOctalFromVisual() }}
⌨️
⚙️
💻
Error: {{ result.error }}
{{ result.command }}
📋

{{ result.permission }} breakdown:

{{ name }}: {{ info.description }} ({{ info.value }})
Target: {{ result.breakdown.who }}
Action: {{ result.breakdown.operation }}
Permissions: {{ result.breakdown.permissions }}
{{ result.breakdown.description }}
🔒
⚠️ ✅ ℹ️ {{ note.message }}
💡
⚠️ {{ error }}

ℹ️ About Linux Chmod Generator

chmod, short for change mode, is the Unix and Linux command for changing file mode bits: the read, write, execute/search, and special permission flags attached to files and directories. The command is standardized by the POSIX chmod utility, and GNU systems document the practical command behavior in the GNU Coreutils chmod manual.

Use a chmod calculator when you need to make a script executable, lock down SSH keys, prepare web files for deployment, fix directory traversal permissions, or compare a symbolic mode such as u+x with the equivalent octal permission such as 755. The generated command is text you can review before running on your own system.

Permission bits:

  • Read (r, 4): view file contents or list directory names.
  • Write (w, 2): modify a file, or create, rename, and delete entries inside a writable directory.
  • Execute/search (x, 1): run an executable file, or traverse a directory path.

User classes:

  • Owner (u): the file owner.
  • Group (g): users who are members of the file's group.
  • Others (o): everyone else on the system.
  • All (a): owner, group, and others together.

Octal modes use one base-8 digit per user class, where read is 4, write is 2, and execute is 1. Add the values to get each digit: 7 means rwx, 6 means rw-, 5 means r-x, and 0 means no permissions. GNU's numeric mode documentation also describes optional leading special bits: set-user-ID, set-group-ID, and the restricted deletion or sticky bit.

Symbolic modes describe a change instead of only a final number. The usual shape is [ugoa][+-=][rwxXstugo]: + adds permissions, - removes them, and = sets the selected class exactly. See the GNU symbolic mode documentation for the full grammar, including X, s, t, and permission-copy forms.

Common examples:

  • chmod 644 index.html: owner can read/write; group and others can read.
  • chmod 755 deploy.sh: owner can read/write/execute; group and others can read/execute.
  • chmod 600 ~/.ssh/id_ed25519: only the owner can read/write a private key.
  • chmod u+x script.sh: add execute permission for the owner without changing group or others.
  • chmod go-rwx secret.txt: remove all group and other permissions from a sensitive file.

Limitations and security: chmod does not change file ownership, groups, POSIX ACLs, SELinux/AppArmor labels, Linux capabilities, or mount options, and those controls can still affect access after a mode change. Be careful with world-writable modes such as 777, set-user-ID or set-group-ID bits, and recursive commands such as chmod -R; applying a broad mode to a directory tree can expose secrets or break executables and directories. GNU also warns that recursive traversal with symlink dereferencing can create security risk on hostile directory trees.

Privacy note: this page generates chmod command text and permission explanations; it does not modify your filesystem. The path and permission values you enter may be sent to the API endpoint for command generation, so avoid entering sensitive real paths when a placeholder will do.

API Usage Example:

POST /api/tools/linux/chmod
Content-Type: application/json

{
    "permissions": [
        "755"
    ],
    "recursive": false,
    "path": "/usr/local/bin/myapp",
    "symbolic": false,
    "explanation": true
}
Ready