Django 部署的项目不是 运行 subprocess shell 命令
Django deployed project not running subprocess shell command
我有一个使用 gunicorn 部署的 django 1.9 项目,其视图包含一行
subprocess.call(["xvfb-run ./stored/all_crawlers.sh "+outputfile+" " + url], shell=True, cwd= path_to_sh_file)
与 ./manage.py runserver 一起运行良好
但在部署和(使用 gunicorn 和 wsgi 部署)时失败。
有什么解决方法的建议吗?
1) 运行s gunicorn 的用户无权访问 运行 .sh 文件
2) 您的 .sh 文件无权 运行ned
3) 尝试使用文件的完整路径
此外,当您尝试在制作中 运行 它时会遇到哪个错误?
我有一个使用 gunicorn 部署的 django 1.9 项目,其视图包含一行
subprocess.call(["xvfb-run ./stored/all_crawlers.sh "+outputfile+" " + url], shell=True, cwd= path_to_sh_file)
与 ./manage.py runserver 一起运行良好 但在部署和(使用 gunicorn 和 wsgi 部署)时失败。
有什么解决方法的建议吗?
1) 运行s gunicorn 的用户无权访问 运行 .sh 文件
2) 您的 .sh 文件无权 运行ned
3) 尝试使用文件的完整路径
此外,当您尝试在制作中 运行 它时会遇到哪个错误?