权限管理 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

你可能感兴趣的:(权限管理 chmod的使用)