您好,欢迎来到叨叨游戏网。
搜索
您的当前位置:首页如何用命令行解决可执行文件的权限问题

如何用命令行解决可执行文件的权限问题

来源:叨叨游戏网

在用命令行执行一个后台监控的可执行文件时出现了如下提示:

[root@promote 桌面]# nohup /etc/nginx_check.sh
nohup: 忽略输入并把输出追加到"nohup.out"
nohup: 无法运行命令"/etc/nginx_check.sh": 权限不够

或:

[root@promote 桌面]# nohup /etc/nginx_check.sh
nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `/etc/nginx_check.sh': Permission denied


此问题说明在执行可执行文件nginx_check.sh时没有权限,此时的解决方法是使用命令:chmod +x /etc/nginx_check.sh
次命令执行之后再执行 nohup /etc/nginx_check.sh & 此时执行结果如在下:
[root@ip-**-**-**-** tomcat6]# nohup: ignoring input and appending output to `nohup.out`

[1]+  Exit 2 nohup /etc/nginx_check.sh
[root@promote 桌面]#
此时nginx_check.sh文件已被执行成功!

 

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- gamedaodao.net 版权所有 湘ICP备2024080961号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务