chmod 计算器
勾选所有者、组和其他人的读、写、执行,755、4755 这样的八进制与 rwxr-xr-x 符号会同步变化。文件、目录、递归 chmod、find、umask 和 Dockerfile 的 COPY --chmod 命令都能直接复制。
完全在浏览器中运行 — 粘贴的内容不会被上传。
每一位是读 4、写 2、执行 1 之和,顺序为所有者、组、其他人。第四位表示 setuid、setgid 和 sticky。
Linux 权限速查表
快速参考- 755 / rwxr-xr-x
- 所有者可写,所有人可读可执行。公开目录和要运行的脚本的标准权限。
- 644 / rw-r--r--
- 只有所有者写,所有人读。index.html、app.yaml 以及仓库里大多数文件都是这个权限。
- 600
- 只有所有者可读写。组或其他用户可读的 SSH 私钥会被 ssh 拒绝,所以 id_ed25519 应保持 600。
- chmod u+x file
- 符号模式只改一类:u、g、o、a 加上 +、-、=,再接 r、w、x。chmod a-w 可让整个目录树只读。
- 4 setuid / 2 setgid / 1 sticky
- 第四位。4755 以所有者权限运行,/tmp 的 1777 让所有人可写但只有所有者能删除。
- umask 022
- 从新文件中去掉的位。022 让文件成为 644、目录成为 755,是服务器常见的默认值。
常见问题
答案在工具下方chmod 755 是什么意思?
所有者可读写执行,组和其他人可读和执行。每一位是读 4、写 2、执行 1 相加,顺序为所有者、组、其他人。
SSH 私钥为什么必须是 600?
组或其他用户可读的密钥会被 ssh 拒绝,因为被复制的密钥等于被冒用的身份。用 chmod 600 id_ed25519 修正,~/.ssh 目录保持 700。
644 和 755 有什么区别?
644 是普通文件,所有者写、所有人读。755 给所有人执行权限,目录要进入、脚本要运行都需要它。
Linux 相关语法指南
全部 Linux 指南Linux: Too many open files (EMFILE) and ulimit
EMFILE is a per-process descriptor limit, ENFILE is the kernel's. Read the limit from /proc, raise it in the right layer, and find the leak that made it matter.
Linuxsystemd status=203/EXEC and 217/USER: Exec and Permission Failures
203 is a failed execve, 217 is a user systemd could not resolve. Both happen before your program runs, and the check that finds each takes one command.
Linuxsystemd Timers vs Cron: Missing PATH, Overlapping Runs, Time Drift
Cron runs a bare shell with no profile and no locking, and systemd reads the system time zone. The environment, single-instance and schedule fixes for both.
LinuxBash Indexed Arrays, Associative Maps, and Parameter Expansion
Quoting decides whether an array stays a list, and the expansion operators replace most external text tools. Includes set -u, mapfile, namerefs, and the bash 3.2 differences that break scripts on macOS.