您的位置:首页 > 其它

chmod命令用进制授予用户、组对文件夹相应权限

2018-09-03 15:43 405 查看
Linux权限分别用二进制和十进制显示如下:
rwx=111=4+2+1=7
r-x=101=4+0+1=5
rw-=110==4+2+0=6
r--=100=4+0+0=4
用r=4,w=2,x=1来表示权限。

[root@sky9896 home]# mkdir Linux
[root@sky9896 home]# ll
drwxr-xr-x 2 root root 4096 9月 3 14:07 Linux
...
[root@sky9896 home]# chmod -R 755 Linux
[root@sky9896 home]# ll
drwxr-xr-x 2 root root 4096 9月 3 14:07 Linux
...
[root@sky9896 home]# chmod -R 775 Linux
[root@sky9896 home]# ll
drwxrwxr-x 2 root root 4096 9月 3 14:07 Linux
...
[root@sky9896 home]# chmod -R 777 Linux
[root@sky9896 home]# ll
drwxrwxrwx 2 root root 4096 9月 3 14:07 Linux
...
[root@sky9896 home]# chmod -R 555 Linux #撤销用户对Linux目录的w权限
[root@sky9896 home]# ll
dr-xr-xr-x 2 root root 4096 9月 3 14:07 Linux
...
[root@sky9896 home]# chmod -R 644 Linux
[root@sky9896 home]# ll
drw-r--r-- 2 root root 4096 9月 3 14:07 Linux
...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  chmod
相关文章推荐