I want to rotate the logs of a Django / apache2 / wsgi website. But sometimes (not always, which is even more strange) logging.handlers.TimedRotatingFileHandler creates new log files owned by root! So my application doesn't have write access any more to the log, and gives me a server error.
I have specified umask=0007 in my WSGIDaemonProcess setting, but that doesn't help either.
How can that happen? and how to fix it?