linus修改权限

u(user)g(group) o(other)a(all)

su root 

chmod   g+w opt

ll(查看)

yyb@ubuntu:/$ su root
Password: 
root@ubuntu:/# chmod o+w opt
root@ubuntu:/# ll
total 108
drwxr-xr-x  24 root root  4096 Dec 14  2017 ./
drwxr-xr-x  24 root root  4096 Dec 14  2017 ../
drwxr-xr-x   2 root root  4096 Jun 20  2018 bin/
drwxr-xr-x   3 root root  4096 Dec 14  2017 boot/
drwxrwxr-x   2 root root  4096 Dec 14  2017 cdrom/
drwxr-xr-x  19 root root  4360 Feb  4 17:11 dev/
drwxr-xr-x 138 root root 12288 Feb  3 18:03 etc/
drwxr-xr-x   3 root root  4096 Dec 14  2017 home/
lrwxrwxrwx   1 root root    32 Dec 14  2017 initrd.img -> boot/initrd.img-4.4.0-21-generic
drwxr-xr-x  22 root root  4096 Dec 14  2017 lib/
drwxr-xr-x   2 root root  4096 Apr 20  2016 lib64/
drwx------   2 root root 16384 Dec 15  2017 lost+found/
drwxr-xr-x   5 root root  4096 Dec 14  2017 media/
drwxr-xr-x   3 root root  4096 Dec 14  2017 mnt/
drwxr-xrwx   5 root root  4096 Feb  3 05:12 opt/
dr-xr-xr-x 296 root root     0 Feb  4 17:11 proc/
drwx------  17 root root  4096 Feb  3 19:23 root/
drwxr-xr-x  26 root root   780 Feb  4 17:11 run/
drwxr-xr-x   2 root root 12288 Feb  2 20:22 sbin/
drwxr-xr-x   2 root root  4096 Apr 19  2016 snap/
drwxr-xr-x   2 root root  4096 Apr 20  2016 srv/
dr-xr-xr-x  13 root root     0 Feb  4 17:24 sys/
drwxrwxrwt  12 root root  4096 Feb  4 17:23 tmp/
drwxr-xr-x  11 root root  4096 Apr 20  2016 usr/
drwxr-xr-x  14 root root  4096 Apr 20  2016 var/
lrwxrwxrwx   1 root root    29 Dec 14  2017 vmlinuz -> boot/vmlinuz-4.4.0-21-generic
root@ubuntu:/# chmod g+w opt
root@ubuntu:/# ll
total 108
drwxr-xr-x  24 root root  4096 Dec 14  2017 ./
drwxr-xr-x  24 root root  4096 Dec 14  2017 ../
drwxr-xr-x   2 root root  4096 Jun 20  2018 bin/
drwxr-xr-x   3 root root  4096 Dec 14  2017 boot/
drwxrwxr-x   2 root root  4096 Dec 14  2017 cdrom/
drwxr-xr-x  19 root root  4360 Feb  4 17:11 dev/
drwxr-xr-x 138 root root 12288 Feb  3 18:03 etc/
drwxr-xr-x   3 root root  4096 Dec 14  2017 home/
lrwxrwxrwx   1 root root    32 Dec 14  2017 initrd.img -> boot/initrd.img-4.4.0-21-generic
drwxr-xr-x  22 root root  4096 Dec 14  2017 lib/
drwxr-xr-x   2 root root  4096 Apr 20  2016 lib64/
drwx------   2 root root 16384 Dec 15  2017 lost+found/
drwxr-xr-x   5 root root  4096 Dec 14  2017 media/
drwxr-xr-x   3 root root  4096 Dec 14  2017 mnt/
drwxrwxrwx   5 root root  4096 Feb  3 05:12 opt/
dr-xr-xr-x 296 root root     0 Feb  4 17:11 proc/
drwx------  17 root root  4096 Feb  3 19:23 root/
drwxr-xr-x  26 root root   780 Feb  4 17:11 run/
drwxr-xr-x   2 root root 12288 Feb  2 20:22 sbin/
drwxr-xr-x   2 root root  4096 Apr 19  2016 snap/
drwxr-xr-x   2 root root  4096 Apr 20  2016 srv/
dr-xr-xr-x  13 root root     0 Feb  4 17:24 sys/
drwxrwxrwt  12 root root  4096 Feb  4 17:23 tmp/
drwxr-xr-x  11 root root  4096 Apr 20  2016 usr/
drwxr-xr-x  14 root root  4096 Apr 20  2016 var/
lrwxrwxrwx   1 root root    29 Dec 14  2017 vmlinuz -> boot/vmlinuz-4.4.0-21-generic
root@ubuntu:/# 
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值