views:

90

answers:

2

I am running Django fcgi with standard line:

exec setuidgid $USERID $VENVBIN/python $WEBAPP/manage.py runfcgi daemonize=false socket=$FCGISOCKET

Problem is that only group is shared between fastcgi process and webserver, not user - however group do not have write permissions by default (hotfix is running chmod g+w manually).

How to force process to make socket in mode 0770?

A: 

can't find a way to do this with fastcgi, added a os.fchmod at the end of my settings.py and that seems to make it work. still its a horrible hack and they should allow you to set it when invoking the service.

justme
Yes, using similar hack, but I would really like to avoid it :]
Almad
A: 

./manage.py runfcgi help says:

umask=UMASK umask to use when daemonizing (default 022).

So you just need to run:

./manage.py runfcgi socket=$FCGISOCKET umask=007

and a socket with mode 0770 will be created. Please note that umask is being set only when daemonize is set to true (which is default).

Ivan Virabyan