權限管理chmod的使用
更改test.c的使用權限
$ chmod a+r test.c
或者寫為:
$ chmod 644 test.c
PS: a(all全部用戶) , u(user用戶) , g(group組) , o(others其他)
chmod允許使用8進制符號作為計算符號
1.例如:- r w x r w - r - x
421 420 401
7 6 5
輸入
$ chmod 765 test.c
test.c的權限跟改為 -rwxrw-r-x
PS: r (read讀取) , w (write寫入) , x(exe運行)
chmod還可以遞歸處理
如:
$ chmod -R a+r test.c
$ chmod -R 644 test.c