Re: logrotate setzt keine User und Gruppen
Uwe Kerstan schrieb:
> * Jakob Schuerz [05-02-2009 16:23]:
>
>>> Und wie gesagt, wenn ich logrotate manuell mit der Option -f aufrufe,
>>> dann wird auch richtig rotiert.
>>>
>>> Mir ist das ein Rätsel.
>> Mir ist auch ein Rätsel, dass wirklich NIEMAND offenbar dazu eine Idee
>> hat...
>> Steh ich echt so allein mit diesem Problem im Wald?
>>
>> manuell ausgeführt werden Owner und Gruppe und Rechte richtig gesetzt.
>> Wenn es über cron ausgeführt wird, dann nicht.
>
> Helfen kann ich dir nicht, aber ich würde das -f in den cronjob
> einbauen. Keine Ahnung, ob es funktioniert ...
In /etc/cron.daily/logrotate steht
#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
in /etc/logrotate.conf steht:
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0660 root utmp
rotate 1
}
# system-specific logs may be configured here
Aus der Zeile "include /etc/logrotate.d" schließe ich, dass auch
sämtliche dateien (die den selben Aufbau wie die beiden nachfolgenden
Konfigurationsblöcke für wtmp und btmp haben) eingelesen werden, die in
/etc/logrotate.d liegen.
Dort ist die Datei trackoptimizer, welche schon früher im Thread genannt
wurde.
Wo soll ich jetzt die Option -f einbauen?
Ich hab mich doch nur an die Vorgaben gehalten, und logrotate um eine
weitere Datei erweitert, die sich um meine speziellen Logfiles kümmern
soll...
Wo ist der Hund im System???
Ja"echt verzweifelt"kob
Reply to: