我已经在Ubuntu 13.04服务器上设置了一个基于django的项目。我可以在uWSGI配置文件上使用'root‘权限运行这个项目。但是当我尝试用标准的'www-data‘用户运行这个命令时,我得到了:
chdir(): Permission denied [uwsgi.c line 1851] 我已经将我的项目及其相应的virtualenv文件夹的所有权更改为'www-data‘,但再次出现此错误!
我的uWSGI配置文件如下所示:
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /root/my_project
# Django's wsgi file
module = my_project.wsgi
# the virtualenv (full path)
home = /root/.virtualenvs/my_project
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 10
# the socket (use the full path to be safe
socket = unix:///root/my_project/server.uwsgi.sock
chmod-socket = 666
uid = www-data
gid = www-data
# clear environment on exit
vacuum = true出什么事了?
发布于 2018-08-02 05:41:48
这可以通过在用户名前添加一个0 (0www-data)来轻松解决。
如果你不关心安全性,因为它会授予root权限。
https://stackoverflow.com/questions/34958222
复制相似问题