跳至主要内容

Chmod 计算器

在八进制(755)、符号形式(rwxr-xr-x)和复选框之间转换 Unix 文件权限,支持 setuid、setgid 和粘滞位、chmod 命令、u+x 等表达式以及 umask。

100% 客户端 · 没有数据离开您的浏览器

Permissions

ClassReadWriteExecuteValue
Owner7
Group5
Others5

Run as the file's owner

Run as group / inherit group

Only owners delete (/tmp)

Notation

3 or 4 digits, e.g. 644 or 2775

Or paste an ls -l column like drwxr-sr-x

Octal (4-digit)
0755
ls -l
-rwxr-xr-x

What it means

  • Owner: can read, write and execute.
  • Group: can read and execute.
  • Others: can read and execute.

Common use: Directories and scripts.

Command

Applies to every file and folder inside. For mixed trees, prefer chmod -R a+rX or find … -type f/-type d.

Run this
chmod 755 deploy.sh

Try a chmod expression

Starts from the current mode (755). Clauses like u+x, go-w, a=rX, g=u or +t.

755 → 755 (rwxr-xr-x)

umask

Which permissions new files and folders get.

New files
644 (rw-r--r--)
New directories
755 (rwxr-xr-x)

关于此工具

为所有者、所属组和其他用户勾选读、写和执行权限,或输入 644、2775 这样的八进制模式,也可以粘贴 ls -l 输出中的权限列(drwxr-sr-x)。三种形式始终保持同步,工具还会用通俗的语言说明对文件或目录而言谁能做什么。它支持 setuid、setgid 和粘滞位(s、S、t、T),可生成八进制或符号形式的 chmod 命令,显示 u+x,go-w 或 a=rX 等 chmod 表达式对当前模式的影响,并计算 umask 为新文件和文件夹设定的默认权限。对于 777 或全局可写文件等有风险的模式,工具会给出警告。

如何计算 chmod 权限

将权限转换为八进制模式和 chmod 命令。

  1. 1

    设置权限

    为所有者、所属组和其他用户勾选读、写和执行,或输入 755 或 rwxr-xr-x。

  2. 2

    按需添加特殊权限位

    开启 setuid、setgid 或粘滞位。

  3. 3

    复制命令

    输入文件名,然后复制 chmod 命令。