【问题标题】:permission denied while collect static django收集静态django时权限被拒绝
【发布时间】:2017-10-10 23:39:30
【问题描述】:

我有 django + guicorn + nginx 的项目 (this tutorial)

我删除虚拟环境并获得一个新的,一切正常,但是当我尝试使用命令时:

source projectenv/bin/activate

folder1/project/manage.py collectstatic 

我收到一个错误:

-bash: folder1/folder/manage.py: Permission denied

即使我尝试:

folder1/folder/manage.py runserver 0.0.0.0:8000

-bash: folder1/folder/manage.py: Permission denied

我应该怎么做才能使这个虚拟环境正常工作?

【问题讨论】:

  • python folder1/project/manage.py collectstatic / folder1/folder/manage.py runserver 0.0.0.0:8000
  • 或确保manage.py 可执行文件:chmod +x folder1/project/manage.py collectstatic
  • 谢谢 python3 folder1/project/manage.py collectstatic 工作正常

标签: python django nginx gunicorn


【解决方案1】:
python3 folder1/project/manage.py collectstatic

正常工作

感谢评论 falsetru

【讨论】:

    猜你喜欢
    • 2016-06-15
    • 1970-01-01
    • 2016-02-02
    • 2021-06-22
    • 1970-01-01
    • 2013-04-07
    • 2012-03-12
    • 2021-01-17
    相关资源
    最近更新 更多