I'm using uwsgi 1.4.5 in emperor-tyrant mode, currently with the
following config (uwsgi is started from an init script):

[uwsgi]
uid = uwsgi
gid = uwsgi
umask = 022
socket = /var/run/uwsgi/uwsgi.socket
pidfile = /var/run/uwsgi/uwsgi.pid
daemonize = /var/log/uwsgi/uwsgi.log
log-reopen =
emperor = /etc/uwsgi.d
emperor-tyrant = true
cap = setgid,setuid

When sending a SIGHUP to the process in the pid file, uwsgi just
kills itself. Does it always need to run with a master in order
for reloading vassals and configuration and logfile reopening to
work?

Secondly, how can I change the logfile ownership to the
non-privileged uwsgi user that I run the emperor as? With the
above configuration, "daemonize" opens the logfile as root
whereas the new logfile after a SIGHUP is of course owned by the
unprivileged user so it ends up with a mix of root and
uwsgi-owned files. I tried "logfile-chown =" but that seems to be
executed after dropping root privileges and thus fails with
"fchown() Operation not permitted".
-- 
Guido Berhoerster
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to