AIStacker
数据

概览

Chmod 权限计算器

通过复选框可视化设置 Unix 文件权限,即时生成八进制值、符号表示和 chmod 命令。

分类 hub

数据

问题

5

FAQ

5

Chmod Permission Calculator

Build Unix file permissions visually. Toggle checkboxes or enter an octal value — get the chmod command instantly.

Entity
Read
Write
Execute
Owner (u)
6
Group (g)
4
Other (o)
4
=
rw-r--r--
chmod 644 filename

可以解决的问题

What's the difference between chmod 755 and chmod 644?

chmod 644 gives the owner read+write and everyone else read-only. chmod 755 adds execute permission — the owner gets read+write+execute and everyone else gets read+execute. Use 644 for static files, 755 for directories and executables.

How do I fix the SSH error "Permissions 0644 are too open" for my private key?

Run chmod 600 ~/.ssh/id_rsa (or your key filename). This restricts the file to owner read+write only. SSH refuses to use keys that are readable by group or other users as a security policy. This tool lets you verify 600 = rw------- before running the command.

What file permissions should I use for a web server (nginx/Apache)?

Files should be 644 (owner rw, group/other r) and directories should be 755 (owner rwx, group/other rx). The web server process (www-data or nginx) needs read access to files and execute access to directories to traverse the path. Never use 777 in production.

How do I apply permissions recursively to all files in a directory?

Use chmod -R 755 /path/to/dir to apply recursively. However, applying 755 to files makes them executable unnecessarily. A better approach: find /path -type f -exec chmod 644 {} \; for files and find /path -type d -exec chmod 755 {} \; for directories.

How do I read the octal permission shown by ls -l?

ls -l shows symbolic notation like -rwxr-xr-x. To get the octal equivalent, use stat -c '%a' filename on Linux or stat -f '%A' filename on macOS. Paste the 3-digit octal result into this tool's Octal Input field to see a visual breakdown of who can do what.

典型使用流程

该工作流相关指南

Supporting guides that connect this tool to the broader category workflow.

打开分类 hub

是什么

Chmod 权限计算器 是什么

The Chmod Permission Calculator lets you build Unix file permission sets visually by toggling read, write, and execute checkboxes for owner, group, and other. The corresponding octal value, symbolic notation (rwxr-xr--), and a ready-to-run chmod command update in real time as you click.

You can also work in reverse: type an octal value like 644 or 755 directly into the input field and the checkboxes update to reflect the permissions it represents. Common presets (644 for regular files, 755 for directories and executables, 600 for private keys, 777 for full access) let you jump to frequently used permission sets with a single click.

如何使用

如何使用Chmod 权限计算器

1. Toggle the checkboxes in the permission grid to set read (r), write (w), and execute (x) for Owner, Group, and Other.

2. Watch the octal value, symbolic notation, and chmod command update instantly.

3. Alternatively, type a 3-digit octal value (e.g., 755) into the Octal Input field to set permissions numerically.

4. Click a preset button (644, 755, 600, 777) to jump to a common permission set.

5. Click "Copy" on the chmod command to paste it directly into your terminal.

使用示例

使用示例

Permission grid for a web server file (644):
  Owner:  r=✓  w=✓  x=✗  → 6
  Group:  r=✓  w=✗  x=✗  → 4
  Other:  r=✓  w=✗  x=✗  → 4

Octal:    644
Symbolic: rw-r--r--
Command:  chmod 644 filename

常见使用场景

常见使用场景

1. Web server file setup: Set 644 for HTML/CSS/JS files and 755 for directories to allow the web server to read files without write access.

2. Private key protection: Use 600 to restrict SSH private keys to owner-only read/write, which SSH requires.

3. Script deployment: Set 755 on shell scripts and Python scripts to make them executable by all users but writable only by the owner.

4. Shared directory setup: Configure group write permissions on shared project directories so team members can collaborate.

5. Security hardening: Audit and correct overly permissive 777 files that expose write access to all users.

常见问题

常见问题

What do the three numbers in chmod (e.g., 755) mean?v
Each digit represents permissions for one entity: the first digit is for the owner, second for the group, third for others. Each digit is the sum of read (4), write (2), and execute (1) permissions — so 7 = rwx (4+2+1), 5 = r-x (4+1), 4 = r-- (4).
When should I use 644 vs 755?v
Use 644 for regular files that should be readable by everyone but only writable by the owner — HTML files, config files, images. Use 755 for directories (which need execute permission to enter) and for scripts or binaries that should be runnable by all users.
Why does my SSH key need 600 permissions?v
The SSH client enforces that private keys are not accessible by other users. If the key file has group or other read permissions (e.g., 644), SSH will refuse to use it and print a "Permissions too open" error. chmod 600 restricts access to the owner only.
What's the difference between octal and symbolic notation?v
Octal notation uses three digits (e.g., 755) where each digit is a sum of permission bits. Symbolic notation uses a 9-character string (e.g., rwxr-xr-x) showing each permission explicitly. Both represent the same permissions — the tool shows both simultaneously.
Does this work for chmod on macOS?v
Yes. chmod works identically on macOS (BSD) and Linux for basic permission bits. The tool covers the standard owner/group/other read/write/execute model that applies to both systems.