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
...
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
...
相关文章推荐
- [加入用户]解决useradd 用户后没有加入用户Home文件夹的情况,Linux改变文件或文件夹的訪问权限命令,linux改动用户password,usermod的ysuum安装包。飞
- linux中如何修改文件夹的用户权限 chown命令
- (通过SQL*Plus)Oracle创建表空间、用户并授予权限命令,切换当前用户
- linux chmod命令参数及用法详解--文件文件夹权限设定命令
- linux 中更改用户权限和用户组的命令实例--chmod,chgrp应用
- Linux-文件夹权限授予某个用户
- linux chmod命令参数及用法详解--文件文件夹权限设定命令
- linux --- 命令 --- chmod参数及用法详解--文件文件夹权限设定命令
- linux 中更改用户权限和用户组的命令chmod,chgrp实例
- Linux 用户(user)和用户组(group)概念以及修改linux文件权限命令chmod
- 文件/文件夹权限设置命令chmod的具体使用方法
- linux chmod命令参数及用法详解--文件文件夹权限设定命令
- 初识linux chmod命令/函数时我就产生一个有趣疑问:既然chmod可以改变权限, 那即使某用户原来没有某文件的权限, 也可以自己添加权限啊!
- ***Linux chmod命令修改文件与文件夹权限命令代码
- linux chmod命令参数及用法详解--文件文件夹权限设定命令
- linux 中更改用户权限和用户组的命令chmod,chgrp实例
- oracle 创建用户 并授予相应权限
- linux 中更改用户权限和用户组的命令chmod,chgrp实例
- win10给文件夹或文件授予指定用户权限
- linux chmod命令参数及用法详解--文件文件夹权限设定命令