Frage zu logrotate
logrotate mag die Permissions nicht so setzen wie ich mir das vorstelle...
Hallo Leute,
ich habe unter SuSE SLES 10 SP 1 ein Problem mit logrotate. /var/log/messages wird nach der Rotation stets als -rw-r----- angelegt. -rw-r--r-- ist von mit gewünscht.
An den Rechten im Verzeichnis selbst kann es wohl kaum liegen:
# ls -ld /var/log
drwxr-xr-x 12 root root 12288 Feb 17 10:52 /var/log
Also die Konfiguration:
# cat /etc/logrotate.conf
...
...
...
# cat /etc/logrotate.d/syslog
...
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
compress
dateext
maxage 365
rotate 99
missingok
notifempty
size +4096k
create 0644 root root
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}
...
# ll /var/log/messages
-rw-r--r-- 1 root root 6548 Feb 17 11:08 /var/log/messages
# logrotate -vf /etc/logrotate.conf
...
rotating pattern: /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall forced from command line (99 rotations)
...
rotating log /var/log/messages, log->rotateCount is 99
renaming /var/log/messages to /var/log/messages-20090217
creating new log mode = 0644 uid = 0 gid = 0
running postrotate script
Reload syslog service done
compressing log with: /usr/bin/bzip2
...
# ll /var/log/messages
-rw-r----- 1 root root 7470 Feb 17 11:30 /var/log/messages
Weiß jemand Rat?
Gruß Arenist
Hallo Leute,
ich habe unter SuSE SLES 10 SP 1 ein Problem mit logrotate. /var/log/messages wird nach der Rotation stets als -rw-r----- angelegt. -rw-r--r-- ist von mit gewünscht.
An den Rechten im Verzeichnis selbst kann es wohl kaum liegen:
# ls -ld /var/log
drwxr-xr-x 12 root root 12288 Feb 17 10:52 /var/log
Also die Konfiguration:
# cat /etc/logrotate.conf
...
- create new (empty) log files after rotating old ones
...
- RPM packages drop log rotation information into this directory
...
# cat /etc/logrotate.d/syslog
...
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
compress
dateext
maxage 365
rotate 99
missingok
notifempty
size +4096k
create 0644 root root
sharedscripts
postrotate
/etc/init.d/syslog reload
endscript
}
...
# ll /var/log/messages
-rw-r--r-- 1 root root 6548 Feb 17 11:08 /var/log/messages
# logrotate -vf /etc/logrotate.conf
...
rotating pattern: /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall forced from command line (99 rotations)
...
rotating log /var/log/messages, log->rotateCount is 99
renaming /var/log/messages to /var/log/messages-20090217
creating new log mode = 0644 uid = 0 gid = 0
running postrotate script
Reload syslog service done
compressing log with: /usr/bin/bzip2
...
# ll /var/log/messages
-rw-r----- 1 root root 7470 Feb 17 11:30 /var/log/messages
Weiß jemand Rat?
Gruß Arenist
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 109228
Url: https://administrator.de/forum/frage-zu-logrotate-109228.html
Ausgedruckt am: 22.04.2025 um 10:04 Uhr
3 Kommentare
Neuester Kommentar