Bug #16944
closedPuppet can't write to /var/log/foreman/cron.log
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1286027
Description of problem:
Puppet can't write to /var/log/foreman/cron.log
Version-Release number of selected component (if applicable):
Red Hat Satellite v.6.1.x
Issue : puppet can't write to /var/log/foreman/cron.log
As customer observed :
For the below line in /etc/cron.d/foreman:
*/2 * * * * puppet /usr/bin/ruby193-ruby /etc/puppet/node.rb --push-facts >>/var/log/foreman/cron.log 2>&1
The log file '/var/log/foreman/cron.log' was not writeable an email with the error message was send by crond to user puppet.
Workaround:
Resolved by doing,
- usermod -aG foreman puppet
and
- chmod g+w /var/log/foreman/cron.log
Updated by Stephen Benjamin over 7 years ago
- Subject changed from Puppet can't write to /var/log/foreman/cron.log to Puppet can't write to /var/log/foreman/cron.log
- Category set to Packaging
That (commented out by default) cron job reccomends to have the node.rb file write to /var/log/foreman as the puppet user. Maybe add a note at least about permissions.
Updated by Dominic Cleal over 7 years ago
- Project changed from Foreman to Packaging
- Category deleted (
Packaging)