最近在用linux系統的時候,有幾次碰到這種問題,在網上找到答案,特別轉載一下:
在用命令行執行一個后台監控的可執行文件時出現了如下提示:
[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文件已被執行成功!
轉自:https://blog.csdn.net/moqiang02/article/details/37902407
