0
点赞
收藏
分享

微信扫一扫

chmod无执行权限

月白色的大狒 2023-11-27 阅读 12
bash运维

查看chmod

[17:03:46 root@localhost data]#ll /usr/bin/chmod 
-rw-r--r--. 1 root root 58584 Nov  6  2016 /usr/bin/chmod

通过chmod自己给自己添加权限,显示拒绝

[17:03:58 root@localhost data]#chmod +x /usr/sbin/chmod
-bash: /usr/bin/chmod: Permission denied

解决办法:

  通过acl添加执行权限

setfacl -m u:root:x /usr/bin/chmod

  使用chmod给自己添加执行权限

chmod +x /usr/bin/chmod

  取消掉acl权限

setfacl -b /usr/bin/chmod

举报

相关推荐

0 条评论