K
K
Konstantin Malyarov2020-03-13 12:43:46
Python
Konstantin Malyarov, 2020-03-13 12:43:46

Why does django + nginx = permission denied?

Taken from here .
CentOS 7

Run:


uwsgi --socket pud.sock --wsgi-file test.py --chmod-socket=666

I get:

2020/03/13 12:24:27 [crit] 2070#2070: *23 connect() to unix:///root/pud/pud.sock failed (13: Permission denied) while connecting to upstream, client: XXX .XXX.XXX.XXX, server: site.ru, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///root/pud/pud.sock:", host: "site. en"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2020-03-13
@ky0

Because there are no rights to access the socket - it is written the same.

D
Dr. Bacon, 2020-03-13
@bacon

You don’t need to be such a woodpecker and do it as root and in /root/ nginx simply does not have the rights to get along this path, although you have given all permissions to the file itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question