[classic-discuss] Syslog/logrotate

Mikkel Nielsen mikkel at t48.dk
Fri Jan 6 09:58:30 UTC 2006


Their seems to be a bug in the logrotate script or syslog behaviour.

The default for the syslog server is to run as the user syslog

 From the man file:
Note  that  when  this  option  is  in  use, syslogd will open all log 
files as root when the daemon is first started; however, after a SIGHUP 
the files will be reopened as the non-privileged user. You should take 
this into account when deciding the ownership of the log files.

So logrotate needs to create all files as the syslog user.
man for logrotate states that all files will keep their owner ship. But 
syslog creates new files as root.

In order to compensate for this logrotate should use:
	create 0600 syslog syslog

or syslog deamon restart should include a chown syslog.syslog in a 
start/restart


--
Mikkel




More information about the Classic-discuss mailing list