chmod Calculator — Linux File Permission Converter
Enter three octal digits (0–7) for owner, group and others to get the symbolic notation and an explanation of exactly which read/write/execute permissions are active.
- 1
Owner bits
7 × 64 = 448Read=4, Write=2, Execute=1 → digit × 2⁶ (= bit position 6) - 2
Group bits
5 × 8 = 40Group digit × 2³ (= bit position 3) - 3
十进制数值
448 + 40 + 5 = 493
这个计算器是如何工作的?
Each chmod octal digit encodes read (4), write (2) and execute (1) bits for owner, group and others. Add active bits: 7=rwx, 6=rw-, 5=r-x, 4=r--, 0=---. Three digits like 755 map to -rwxr-xr-x. Enter digits 0–7 for each group to see the full symbolic notation and per-group breakdown instantly.
公式
How this is calculated
Linux and Unix file permissions are governed by three groups — owner (user), group and others — each holding three independent permission bits: read (r, value 4), write (w, value 2) and execute (x, value 1). Adding the values of the active bits produces a single octal digit 0–7 for each group. The three digits are concatenated to form the familiar chmod code, such as 755 or 644.
The nine-character symbolic notation is decoded from those three digits. Each group of three characters uses the same rule: if bit 2 is set the first character is "r", otherwise "-"; bit 1 gives "w" or "-"; bit 0 gives "x" or "-". Concatenating owner, group and others (prefixed with a file-type character, "-" for regular files) gives the full notation such as -rwxr-xr-x for 755.
Common presets: 755 (rwxr-xr-x) suits executables and directories — the owner can read, write and execute; everyone else can only read and execute. 644 (rw-r--r--) is the default for regular files — owner reads and writes, others read only. 600 (rw-------) is used for sensitive files like SSH private keys. Avoid 777 on production servers because it grants write access to every user on the system.
常见问题
chmod 755 decodes to rwxr-xr-x: the owner (digit 7 = r+w+x) can read, write and execute the file; group (digit 5 = r+x) and others (digit 5 = r+x) can only read and execute. This is the standard permission for public executables and shared directories.
For each three-character group, assign 4 for "r", 2 for "w", 1 for "x", and 0 for "-", then add them. rw- = 4+2+0 = 6; r-x = 4+0+1 = 5; rwx = 7; --- = 0. Join the three digits to get the octal code.
chmod 644 (rw-r--r--) gives the group read-only access. chmod 664 (rw-rw-r--) also grants the group write access. Use 664 when users in the same Unix group need to collaborate and edit the same files.
也称为
TG we-Calculate Editorial Team. (2026). chmod Calculator — Linux File Permission Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/zh/calculator/chmod-calculator
TG we-Calculate Editorial Team. "chmod Calculator — Linux File Permission Converter." TG we-Calculate. 2026. https://we-calculate.com/zh/calculator/chmod-calculator.
TG we-Calculate Editorial Team, "chmod Calculator — Linux File Permission Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh/calculator/chmod-calculator
@misc{wecalculate_chmod_calculator, title = {chmod Calculator — Linux File Permission Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh/calculator/chmod-calculator}}, year = {2026}, note = {TG we-Calculate} }
这个计算器对您有帮助吗?
