我在Ubuntu 13.04服务器上设置了一个基于django的项目。 我可以在uWSGI配置文件上使用“root”权限运行此项目。 但是,当我尝试使用标准“www数据”用户运行此我得到:权限被拒绝uWSGI问题
chdir(): Permission denied [uwsgi.c line 1851]
我已经改变了我的项目,其相应的virtualenv文件夹“www数据”,但再次出现此错误的所有权!
我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
有什么错?
是另一个用户“chown”的目录吗? –
不!亲爱的@AaronLelevier。 我带来的uWSGI文件中提到的所有文件夹都是由用户www-data使用chown由www-data组成的 – AbdolHosein