After tor log file has been rotated by logrotate utility, tor fails to start. Reproducible: Always Steps to Reproduce: 1. Start tor daemon 2. Wait until log file fill ups and log rotation happens 3. See that tor isn't functioning anymore It happens because logrotate sets default ownership on newly created /var/log/tor.log - root:wheel. tor daemon runs under tor:tor credentials, so it can't open its own log file and fails to start. Solution: add "create 0640 tor tor" to /etc/logrotate.d/tor.
Have you informed upstream about it? Fixed in -r1 with newly added logrotate USE flag. Please test and report back. Thank you for your valuable bug report.
Yes, I wrote to upstream. I tested your changes, it didn't work. You incorrectly placed line 'create 0640 tor tor' inside construction postrotate/endscript. Inside this construction only shell commands are allowed, they will be run after the logfile is rotated, so I receive following output: sh: line 2: create: command not found error: error running shared postrotate script for /var/log/tor/*.log You must put this line before postrotate/endscript construction. I reopened the bug.
(In reply to comment #2) > Yes, I wrote to upstream. Any answer yet? > I tested your changes, it didn't work. You incorrectly placed line 'create 0640 > tor tor' inside construction postrotate/endscript. Inside this construction > only shell commands are allowed, they will be run after the logfile is rotated, > so I receive following output: > > sh: line 2: create: command not found > error: error running shared postrotate script for /var/log/tor/*.log > > You must put this line before postrotate/endscript construction. I reopened the > bug. Ok, I was flying blindly here, so thanks for the test. I had a look at some documentation and thought place was sensible here. Should be fixed now in -r2.
> Any answer yet? Not yet. Here you can track their progress: https://bugs.torproject.org/flyspray/index.php?do=details&id=676 > Should be fixed now in -r2. Yes, now all works fine.