權限管理 chmod的使用

權限管理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
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容