跳過導航到主內容
Calnex LogoCalnex
開發者工具

Chmod 權限計算器

在數字 (755) 和符號 (rwxr-xr-x) Linux 檔案權限之間轉換。顯示擁有者、群組和其他權限的詳細分解及 chmod 指令。

參數

輸入3位數字權限或9字元符號(rwxr-xr-x)。

結果

數位權限755

與 chmod 一起使用的八進位數字表示形式

其他結果 (7)
符號形式
rwxr-xr-x

人類可讀的符號表示

擁有者7 (rwx)

Owner can read, Owner can write, Owner can execute

群組5 (r-x)

Group can read, Group can execute

其他5 (r-x)

Others can read, Others can execute

指令
chmod 755 <file>

設定這些權限的shell指令

安全評估
✅ Good (standard)

Standard permission for executable files and directories. Owner has full control, others can read and execute.

權限位參考
Bit | Value | Permission
----|-------|----------
r   |   4   | Read
w   |   2   | Write
x   |   1   | Execute
-   |   0   | None

Unix 權限位元如何對應到數值

點解揀 Chmod 權限計算器

Chmod 計算器在數字 (755) 和符號 (rwxr-xr-x) 表示之間轉換 Unix 檔案權限。它分解擁有者、群組和其他權限,產生 chmod 命令,並提供權限集的安全評估。

  • ✓在數字(八進位)和符號權限格式之間轉換
  • ✓分解所有者、群組和其他人的權限
  • ✓產生即用型 chmod shell 指令
  • ✓提供安全評估,突顯有風險的權限

使用步驟

  1. 1輸入數字權限代碼(如 755)或符號字串(如 rwxr-xr-x)
  2. 2查看兩種格式的轉換後的表示形式
  3. 3閱讀每個角色(所有者、群組、其他)可以執行的操作的詳細信息
  4. 4複製 chmod 命令以應用這些權限
  5. 5查看安全評估以了解風險級別

常見問題 (FAQ)

chmod 755 是什麼意思?

chmod 755 設定權限,以便擁有者可以讀取、寫入和執行 (7),而群組和其他人可以讀取和執行 (5)。這是可執行檔和目錄的標準權限。

Unix 權限號碼如何運作?

Unix permissions use three bits per role (read=4, write=2, execute=1). Add the bits together: rwx = 4+2+1 = 7, r-x = 4+1 = 5, r-- = 4. Three roles (owner, group, other) give a 3-digit octal number like 755.

為什麼777很危險?

權限 777 為系統上的每個人提供完全的讀取、寫入和執行存取權限。任何使用者都可以修改或刪除該檔案。這只應在非常特定的受控場景中使用,切勿用於敏感文件或 Web 目錄。

我應該對 Web 伺服器檔案使用什麼權限?

對於大多數 Web 文件,對文件使用 644(所有者讀/寫,其他人讀),對目錄使用 755(所有者完整,其他人讀/執行)。包含敏感資料的設定檔應為 600(所有者只讀/寫)。

檔案和目錄的權限有什麼差別?

對於文件來說,執行意味著該文件可以作為程式運行。對於目錄,執行意味著您可以進入(cd 進入)目錄並存取其內容。您需要目錄的執行權限才能存取其中的文件,即使您擁有這些文件的讀取權限。

權威參考資料

chmod - Linux man page

睇來源

File System Permissions - Wikipedia

睇來源

Unix Permissions Calculator

睇來源