<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">.mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}
</style>
</head><body style="">
<div>
<p dir="ltr">Thanks Jean-Paul. I have no idea how I managed to miss both tickets (there is a duplicate) and would like to apologize.</p>
<p dir="ltr">The required change is really small, despite the age of the ticket. Is there anything I can do to help fix it (e.G. contribute)?</p>
<p dir="ltr">Thanks a lot for your work on Twisted.</p>
<p dir="ltr">Regards,<br />max</p> > exarkun@twistedmatrix.com hat am 11. Juni 2014 um 17:52 geschrieben:
<br />>
<br />>
<br />> On 03:05 pm, max@riehl.io wrote:
<br />> >Hi!
<br />> >
<br />> >I'm finding it difficult to get log rotation working cleanly with
<br />> >twistd (if dropping privileges through twistd, which we require).
<br />> >I went through all the docs and also found [1] very helpful, but the
<br />> >problem boils down to the fact that
<br />> >> Implications for Logfile Rotation
<br />> >>
<br />> >>Using the configuration described here, the LOGFILE will be created as
<br />> >>user "root" and group "root", but rotated as user UID and group GID.
<br />> >>If you want rotation to work as advertised it is necessary to put the
<br />> >>LOGFILE in a directory in which UID/GID has permissions to rename
<br />> >>files.
<br />> >
<br />> >and
<br />> >> def rotate(self):
<br />> >> """
<br />> >> Rotate the file and create a new one.
<br />> >>
<br />> >> If it's not possible to open new logfile, this will fail
<br />> >>silently,
<br />> >> and continue logging to old logfile.
<br />> >> """
<br />> >> if not (os.access(self.directory, os.W_OK) and
<br />> >>os.access(self.path, os.W_OK)):
<br />> >> return
<br />> >(twisted 14.0.0)
<br />> >
<br />> >will never work together. Even if the user twistd runs as is
<br />> >technically able to rename the log file (due to having write
<br />> >permissions on the directory), it will never try to since it can't
<br />> >write to the file.
<br />> >There is a workaround on a comment in [1] but that's a really
<br />> >unnecessary and hacky solution, IMHO.
<br />> >
<br />> >Is this a known bug?
<br />>
<br />> Sounds like https://twistedmatrix.com/trac/ticket/5723
<br />>
<br />> Jean-Paul
<br />>
<br />> _______________________________________________
<br />> Twisted-Python mailing list
<br />> Twisted-Python@twistedmatrix.com
<br />> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
<br />>
</div>
</body></html>