+++ This bug was initially created as a clone of Bug #450703 +++ Description of problem: LOGFILE is set to /var/log/rkhunter.log in /etc/cron.daily/rkhunter while it is set to /var/log/rkhunter/rkhunter.log in /etc/rkhunter.conf and in the logrotate configuration Version-Release number of selected component (if applicable): rkhunter-1.3.2-3.fc8 How reproducible: always Steps to Reproduce: 1. install rkhunter-1.3.2-3.fc8 2. wait until nightly rkhunter run 3. Actual results: Get email saying: /etc/cron.daily/logrotate: error: stat of /var/log/rkhunter/rkhunter.log failed: No such file or directory Expected results: No email should be sent saying logrotate can't find the log file Additional info: --- Additional comment from Kevin Fenzi on 2008-06-10 12:57:37 EDT --- Yes, this is a bug on my part... the cron file didn't get updated for f7/f8 properly. ;( I will get it fixed soon. Thanks for the bug report. --- Additional comment from Fedora Update System on 2008-06-17 15:03:35 EDT --- rkhunter-1.3.2-4.fc9 has been submitted as an update for Fedora 9 --- Additional comment from Fedora Update System on 2008-06-17 15:15:15 EDT --- rkhunter-1.3.2-4.fc8 has been submitted as an update for Fedora 8 --- Additional comment from Kevin Fenzi on 2008-06-17 15:27:49 EDT --- This should be fixed in the above updates... can you test them and confirm they solve the issue you are seeing? --- Additional comment from Fedora Update System on 2008-06-20 15:05:44 EDT --- rkhunter-1.3.2-4.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rkhunter'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-5455 --- Additional comment from on 2008-06-24 14:09:03 EDT --- The update appears to be working just fine. Thanks --- Additional comment from Fedora Update System on 2008-06-26 04:32:44 EDT --- rkhunter-1.3.2-4.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report. --- Additional comment from Fedora Update System on 2008-06-26 04:33:29 EDT --- rkhunter-1.3.2-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report. --- Additional comment from Kevin Fenzi on 2008-06-26 11:30:50 EDT --- Closing this one now. Feel free to re-open or file a new bug if you spot any further issues. Thanks for filing the bug! --- Additional comment from Fedora Update System on 2008-07-26 02:00:13 EDT --- rkhunter-1.3.2-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report. Looks like this bug is back in: rkhunter-1.4.2-2.fc20.noarch. /etc/cron.daily/rkhunter hardwires LOGFILE to /var/log/rkhunter/rkhunter.log, ignoring the setting in /etc/rkhunter.conf. I also noticed that /etc/sysconfig/rkhunter and /etc/rkhunter.conf both have settings for MAILTO, which will conflict if one is changed without changing the other.
What do you have set in /etc/rkhunter.conf ? Do you have any /etc/rkhunter.conf.rpm* files
UID0_ACCOUNTS and MAIL-ON-WARNING (I guess MAILTO is only a sysconfig/rkhunter variable). No, No *.rpmnew files.
I'm a bit confused as to the actual error you are seeing here? Can you attach output from a 'rkhunter -c -sk' ? Does the LOGFILE setting differ between the two files?
Just look at the code in /etc/cron.daily/rkhunter. It hardwires the LOGFILE setting as /var/log/rkhunter/rkhunter.log. Thus if you change LOGFILE in /etc/rkhunter.conf, you have to hack /etc/cron.daily/rkhunter in order to achieve the result you want. Note also that there is a MAIL-ON-WARNING setting in /etc/rkhunter.conf and a MAILTO setting in /etc/sysconfig/rkhunter. Seems like there should be only one config file: /etc/rkhunter.conf, since that is the one mentioned in the rkhunter man page. /etc/sysconfig/rkhunter should be obsoleted, and it's configuration merged with /etc/rkhunter.conf.
(In reply to Michael Carney from comment #4) > Just look at the code in /etc/cron.daily/rkhunter. It hardwires the LOGFILE > setting as /var/log/rkhunter/rkhunter.log. Thus if you change LOGFILE in > /etc/rkhunter.conf, you have to hack /etc/cron.daily/rkhunter in order to > achieve the result you want. You shouldn't do this. selinux policy is setup to know that as the correct location for logs. If you are changing it, you would not only have to do so in both places, but setup policy for the new location. I suppose we could grep out the LOGFILE directive... > Note also that there is a MAIL-ON-WARNING setting in /etc/rkhunter.conf and > a MAILTO setting in /etc/sysconfig/rkhunter. Seems like there should be only > one config file: /etc/rkhunter.conf, since that is the one mentioned in the > rkhunter man page. /etc/sysconfig/rkhunter should be obsoleted, and it's > configuration merged with /etc/rkhunter.conf. those are different things. MAIL-ON-WARNING is useless and should get dropped. MAILTO is used by the cron script, not rkhunter itself...
Hi Kevin, I didn't move the log from /var/log, I just renamed the file. The only rkhunter-specific selinux context is /var/lib/rkhunter(/.*)? There is no /var/log/rkhunter context. Actually, I find MAIL-ON-WARNING useful, because I redirect the warning mail to me, not root. What would replace it?
(In reply to Michael Carney from comment #6) > Hi Kevin, > I didn't move the log from /var/log, I just renamed the file. The only > rkhunter-specific selinux context is /var/lib/rkhunter(/.*)? There is no > /var/log/rkhunter context. ok. > Actually, I find MAIL-ON-WARNING useful, because I redirect the warning mail > to me, not root. What would replace it? MAILTO in /etc/sysconfig/rkhunter ? So, I'm open to ideas to improve here, but not sure there is any... the cron job uses config from /etc/sysconfig/rkhunter, and I don't think it would be too great to try and parse from /etc/rkhunter.conf...
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.