[classic-discuss] Syslog/logrotate
Jaakko Heinonen
jh at tinysofa.org
Fri Jan 6 11:13:46 UTC 2006
Hi,
On 2006-01-06, Mikkel Nielsen wrote:
> Their seems to be a bug in the logrotate script or syslog behaviour.
>
> 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.
This shouldn't be a problem with default configuration since default
logfiles are created with syslog ownership. When logrotate rotates
logfiles it keeps the ownership for new files. Am I correct?
However I can see that a problem occurs if you define a custom syslog
log file (in /etc/syslog.conf) and you don't create an initial log file
manually with syslog ownership. Now when syslog creates the log file
first time it ends up to be owned by root.
> In order to compensate for this logrotate should use:
> create 0600 syslog syslog
This is not a correct fix since user may not use logrotate for custom
log files.
> or syslog deamon restart should include a chown syslog.syslog in a
> start/restart
Yes, it sound correct that syslogd should create new logfiles with
syslog ownership rather than root.
Did I understand the problem correctly? Also could you explain the
circumstances where you saw the problem in more detail?
--
Jaakko
More information about the Classic-discuss
mailing list