Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uWSGI chmod Socket to 666

Tags:

uwsgi

When uWSGI prints chmod() socket to 666 for lazy and brave users in its log what does it mean exactly?

I'm not seeing anything in the docs about it. Though maybe I've not searched enough.

like image 894
Nalum Avatar asked Jan 20 '14 14:01

Nalum


1 Answers

It's logging the fact that you didn't explicitly specify the permissions for the socket and is telling you that it's done this for you:

http://uwsgi-docs.readthedocs.org/en/latest/Options.html#chmod-socket

See:

chmod-socket

Argument: optional string

Chmod socket.

This option may be set with -C from the command line.

UNIX sockets are filesystem objects that obey UNIX permissions like any other filesystem object. You can set the UNIX sockets’ permissions with this option if your webserver would otherwise have no access to the uWSGI socket. When used without a parameter, the permissions will be set to 666. Otherwise the specified chmod value will be used.

Relevant source code in socket.c:

https://github.com/unbit/uwsgi/blob/master/core/socket.c#L238-L251

like image 79
Kev Avatar answered Oct 18 '22 19:10

Kev