Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/

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.

share|improve this question
up vote 2 down vote accepted

If I understand correctly, /var/log/paul/events.log is owned by root; yet, you have a script running as the rsyslog user, who cannot move /var/log/paul/events.log.

sudo chown -R root.rsyslog /var/log/paul/
sudo chmod 0775 /var/log/paul
sudo chmod g+s /var/log/paul

Now, new files in /var/log/paul are always owned by rsyslog. Another solution to use is ACL.

share|improve this answer
Thanks Christopher – Paul Whelan Feb 3 '11 at 9:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.