将chmodsocket设置为666安全吗?

2024-03-28 19:30:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我用Django和uWSGI一起使用,这是我的django.ini公司文件:

# django.ini file
[uwsgi]

# master
master                  = true
touch-reload =  /www/django.ini


# maximum number of processes
processes               = 8

# the socket (use the full path to be safe)
socket          = /tmp/uwsgi.sock


# with appropriate permissions - *may* be needed
chmod-socket    = 666

# the base directory
chdir           = /www/proj

# Django's wsgi file
wsgi-file          = /www/proj/proj/wsgi.py

# the virtualenv
home            = /home/me/.djenv

# clear environment on exit
vacuum          = true

我也有

^{pr2}$

其中mewww-data组的用户

我对666chmod-socket权限感到不安,但是当我注释掉它,并通过uwsgi --ini django.ini重新初始化脚本时,我得到了502 Bad Gateway。在

所以想知道给socket666权限是否会带来安全问题,如果是的话,如何解决它?在


Tags: thedjangomastertruewsgiwwwsocketbe