天天看點

linux的執行sh檔案的權限問題

linux設定crontab定時任務scrapy crawl mySpider時,出現錯誤:

CROND[10166]: (root) MAIL (mailed 59 bytes of output but got status 0x004b#012)

原因之一:你執行sh檔案的目錄沒有權限(沒有權限執行sh檔案)

linux的執行sh檔案的權限問題

解決方案:

我的sh檔案放在/srv/dieaseMap,到/srv/dieaseMap目錄下執行chmod u+x *.sh語句使該目錄獲得運作sh檔案的權限。

linux的執行sh檔案的權限問題

然後就不會出現以上報錯了。