[Twisted-Python] Log file ownership

Enrique Samson Jr, enriquejr at gmail.com
Wed Jun 6 22:42:08 EDT 2012

On 6/7/12 10:27 AM, Itamar Turner-Trauring wrote:
> On 06/06/2012 08:46 PM, Enrique Samson Jr, wrote:
>> Hi,
>> I am running an app as root on Linux using a .tac file and twistd. The
>> application object is initialized with a certain gid and uid. Logging is
>> configured to rotate daily by way of DailyLogFile. However, the log file
>> it creates is owned by root with 600 file permission and log rotation is
>> failing. I have read about acl to configure default file permissions but
>> is there a way to solve this only in Twisted?
> Perhaps someone else can comment on what might be a bug, but one thing 
> to do is to run your program directly as the uid and gid you want 
> (rather than than root).Since presumably the goal is to bind to a port 
> <1024, you can do that instead using authbind 
> (http://manpages.ubuntu.com/manpages/hardy/man1/authbind.1.html).
I need to execute ulimit to increase max open files (20K), reason why
I'm running this as root.

More information about the Twisted-Python mailing list