![]() |
![]() |
![]() |
![]() |
![]() |
chmod | [-option] | [ugoa] | [+-=] | [rwx] | [st] | [file directroy] |
-c → 回報異動部份 -R → 遞迴目錄內的檔案 -v → 回報執行過程 |
u →user g →group o →other a →all |
+ →增加權限 - →減去權限; = →直接設定權限 |
r → read 權限 w → write 權限 x → excute 權限 |
s →suid 或 sgid t →sticky bit |
檔案或目錄 |
0 → --- 1 → --x 2 → -w- 3 → -wx 4 → r-- 5 → r-x 6 → rw- 7 → rwx例 如chmod 543 FILE,此時檔案的 permission 為 r-w r-- -wx(自行比對上表)。