免费 · 开发
chmod 权限计算器.
在八进制(755)与符号形式(rwxr-xr-x)之间转换 Unix 文件权限,支持 setuid、setgid 和粘滞位,并给出权限表和 chmod 命令。
Loading the calculator…
换算 chmod 权限
- 输入八进制模式(如 755)或九个字母(如 rwxr-xr-x),也可以粘贴完整的 ls -l 行。
- 填写文件名即可得到可直接运行的 chmod 命令,或从常用预设开始。
- 查看表格,了解谁可以读取、写入和执行该文件。
示例:755 即 rwxr-xr-x:所有者可读、写、执行;所属组和其他人可读、执行。1777 加上粘滞位,变为 rwxrwxrwt,这是 /tmp 的常见模式。
限制与支持格式
输入内容在您的设备上处理。
英语技术说明
Standard Unix permission bits only; ACLs and SELinux labels are not covered. Everything is calculated in your browser; nothing you type is uploaded.
Each class (owner, group, others) adds read = 4, write = 2 and execute = 1. A fourth leading digit sets setuid (4), setgid (2) and the sticky bit (1), shown as s, s and t in the symbolic form.
755 is rwxr-xr-x: the owner can read, write and run the file; group and others can read and run it. 1777 adds the sticky bit (rwxrwxrwt).
常见问题
chmod 755 是什么意思?
所有者可读、写、执行;组和其他人可读、执行。这是脚本和目录的典型权限。
应该用 chmod 777 吗?
很少需要。它允许所有用户修改文件。建议配合正确的组使用 755 或 775。
什么是粘滞位?
设在目录上时,即使其他人可以在该目录中写入,也只有文件所有者能删除或重命名文件,例如 /tmp。