rsyslog channels change ownership from root
- by Paul Whelan
Hello all I am using rsyslog on ubuntu 10.4 64bit LTS.
the following is the relevant config in /etc/rsyslog.d/60-mylogger.conf
$template Paul,"%msg%\n"
$outchannel
log_rotation_paul,/var/log/paul/events.log,2000,/opt/scripts/log_rotation_script.sh
local0.* $log_rotation_paul;Paul
This should rotate every 2000 bytes
My problem is the the channel directive here causes the ownership defined in /etc/rsyslog.conf to be completely ignored and when my log rotate script is called I don't have the root permissions required to move my log file as its the script runs as rsyslog and the file I am moving requires root permissions.
Any ideas I found this link but unfortunately it does not fix my issue.