Uwsgi + nginx how to change group?

im trying to execute uwsgi + nginx + django and got stuck there (links to links directly to the section where I stuck) https://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#if-that -doesn-t-work

nginx error.log says:

2015/03/09 13:44:51 [crit] 11642#0: *16 connect() to unix:///home/gaucan/temp/my_app/mysite.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:///home/gaucan/temp/my_app/mysite.sock:", host: "localhost:8000"

and the tutorial says, to fix this, follow these steps: You may also have to add your user to nginx’s group (which is probably www-data), or vice-versa, so that nginx can read and write to your socket properly. But im linux noob and I don’t know how to do this, or how to find out if this group is www-data or not ... already made some mess before changing owner to some folders for user: "gaucan"

I also skipped this step in the tutorial: You will need the uwsgi_params file, which is available in the nginx directory of the uWSGI distribution, or from https://github.com/nginx/nginx/blob/master/conf/uwsgi_params since I don’t know which directory nginx directory of the uWSGI distribution...

btw I use FEDORA if this helps ...

+4
2

:

ls -al unix:///home/gaucan/temp/my_app/mysite.sock

, unix:

-rw-rw-r--   1 user group  1234 Mar 9 2015  name of file

, . , exeute , . 3 , . 3 .

nginx .

, nginx, . , , 100% .

- , -

:

ps aux | grep nginx

nginx

, :

groups

unix, .

,

sudo usermod -G group1,group2  username

, , , .

-append usermod:

sudo usermod --append www-data username

, . ( , )

+2

, , , , , /etc/nginx/nginx.conf, ... ( mysite_nginx.conf, symlinking , nginx...)

/tmp/sock.sock mb, ..

0

All Articles