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