FS#25094 - [exim] logrotate.d file needs update for logrotate 3.8.0

Attached to Project: Community Packages
Opened by Ray (ataraxia) - Sunday, 10 July 2011, 15:24 GMT
Last edited by Ionut Biru (wonder) - Monday, 18 July 2011, 17:18 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Angel Velasquez (angvp)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
As of version 3.8.0, logrotate now needs to be told when logs are owned by a user and/or group other than root. If not, it will skip the log and produce an error:

error: skipping "/var/log/exim/mainlog" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

This can be easily fixed for exim's case by adding a line "su exim exim" inside the block in /etc/logrotate.d/exim. Updated file attached.


Additional info:
* package version(s)
exim 4.76-2

* config and/or log files etc.


Steps to reproduce:
Run logrotate
   exim (0.1 KiB)
This task depends upon

Closed by  Ionut Biru (wonder)
Monday, 18 July 2011, 17:18 GMT
Reason for closing:  Not a bug
Comment by arielp (ajp) - Monday, 18 July 2011, 12:46 GMT
adding "su exim exim" to the logrotate.d/exim file produces the following error when the monthly log rotation happens.

error: error creating output file /var/log/old/mainlog.1.gz: Permission denied
Comment by Dave Reisner (falconindy) - Monday, 18 July 2011, 14:58 GMT
@ajp: I assume you have the directive 'olddir' set in /etc/logrotate.conf. logrotate is trying to write the files as exim:exim and doesn't have permission to do so. This isn't really standard, but the workaround would simply be to 'chgrp log /var/log/old; chmod 775 /var/log/old' and add 'exim' to the 'log' group.
Comment by arielp (ajp) - Monday, 18 July 2011, 17:11 GMT
@falconinfy: Yes that will solve this particular issue. But, considering the version of exim.logrotate in community testing right now. I think other users with 'olddir' may get bitten by this once it comes out of testing. Everything worked with the previous version of exim. These, I think, are just issues with the new version.
Comment by Dave Reisner (falconindy) - Monday, 18 July 2011, 17:17 GMT
No, this is _your_ configuration issue. Users with the default /etc/logrotate.conf file will not encounter this issue because 'olddir' is unset, meaning that logfiles are rotated in place (i.e. in the same directory).

Loading...