On 11:35 am, [email protected] wrote:
>I am running twisted application from /etc/init/myapp.conf by exec
>statement like this:
>exec /usr/bin/twistd --uid=<id> --gid=<gid> --logfile=/var/log/dir/file
>
>The problem is when log file is first created under /var/log/dir (dir 
>is
>owned by user id), the owner of the file is 'root', not requested user.
>As a consequence, the twistd is not able to rotate log files.
>
>If the logfile is already created (and chowned) before running twistd,
>there is no problem. It looks like set uid/gid is called too late 
>inside
>twistd. It is suppose to be called before creating a logfile.
>
>Is this a bug or am I missing something?

If <id> or <gid> has write permission on /var/log/dir/ then rotation 
should work, even if <id> or <gid> does not own the first logfile 
created.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to