在核取方塊、八進位(如 755)和符號表示法(如 rwxr-xr-x)之間轉換 Unix 檔案權限。
如何使用 chmod 計算機
為擁有者、群組和其他勾選讀、寫和執行核取方塊。
或輸入像 755 這樣的八進位值以自動設定核取方塊。
複製可直接執行的 chmod 指令。
Unix file permissions control who can read, write and execute a file or directory, split across three groups: the owner, the group, and everyone else. This calculator converts between interactive checkboxes, the numeric octal form like 755, and the symbolic form like rwxr-xr-x, keeping all three in sync.
Each group gets three bits, read (4), write (2) and execute (1), and you add them up to get one digit. So 7 is read plus write plus execute (rwx), 5 is read plus execute (r-x), and 6 is read plus write (rw-). Three digits, one per group, give you the familiar permission number.
The common values are worth memorizing. 755 suits directories and executables: the owner has full access while group and others can read and execute but not write. 644 suits normal web files: the owner can read and write, everyone else can only read.
For sensitive files, 600 keeps things tight: only the owner can read or write, and nobody else has any access, which is what SSH private keys and similar secrets need.
There is also an optional fourth leading digit for special bits, setuid, setgid and the sticky bit, which change how programs run or how a shared directory behaves. When one is set, the execute position shows as s or t instead of x.
The calculator gives you the ready-to-run chmod command to copy, and runs entirely in your browser. It is a reference and converter, so it does not change any files itself.
常見問題
755 給予擁有者完全存取權限,其他所有人讀和執行,用於目錄和腳本。644 給予擁有者讀和寫,其他所有人只讀,用於一般檔案。
777 給予所有人讀、寫和執行權限。在伺服器上幾乎總是不安全的,因為任何使用者都能修改該檔案。建議改用 755 或 644。
新增執行位元。從 644 你可以改為 755(或 chmod +x),這會為擁有者、群組和其他開啟執行權限。
八進位(如 755)將權限編碼為數字,而符號表示法(rwxr-xr-x 或 u+x)用字母描述。本工具同時顯示兩者並保持同步。
它們是第四個前導數字。setuid 和 setgid 讓程式以其擁有者或群組的身份執行,目錄上的 sticky 位可阻止使用者刪除彼此的檔案(如 /tmp 上)。
當設定了 setuid、setgid 或 sticky 位時,執行位元位置會顯示為 s 或 t 而非 x,以表明特殊位元處於活動狀態。
嵌入此工具
將此工具加入你自己的網站。複製下方的程式碼片段,它會自動保持最新。
<iframe src="https://monu.tools/embed/zh-Hant/chmod-calculator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相關工具