【问题标题】:Permission denied on executable, as root以root身份拒绝可执行文件的权限
【发布时间】:2015-07-24 19:42:16
【问题描述】:

当我尝试以 root 身份运行 bash 脚本时,我的权限被拒绝:

[root@boxen test3]# ll
-rwxr-xr-x. 1 root webdev 172 Jul 24 15:30 printdate.sh

[root@boxen test3]# ./printdate.sh 
-bash: ./printdate.sh: Permission denied

以下是包含文件夹的权限:

[root@boxen test3]# namei -l /www/virtualhosts/test3/
f: /www/virtualhosts/test3/
dr-xr-xr-x root   root   /
drwxr-xr-x root   root   www
drwxrwx--- apache webdev virtualhosts
drwxrwxrwx apache webdev test3

是什么导致了权限错误?

【问题讨论】:

    标签: permissions centos executable


    【解决方案1】:

    问题是该卷是使用 noexec 安装的。我暂时用

    重新安装
    mount -o remount,exec /www/
    

    完成了我的工作,然后将 noexec 设置回原位。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-10
      • 1970-01-01
      • 2021-05-18
      • 1970-01-01
      • 1970-01-01
      • 2015-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多