[Samba] missing file in logrotate config
Michael Tokarev
mjt at tls.msk.ru
Wed Dec 6 11:34:14 UTC 2023
06.12.2023 14:13, Michael Tokarev via samba:
> 06.12.2023 10:01, Stefan G. Weichinger via samba:
>
>> /var/log/samba/log.rpcd_* {
>
>> log.rpcd_spoolss
>> log.rpcd_spoolss.1
>> log.rpcd_spoolss.1.1
>> log.rpcd_spoolss.1.1.1
>> log.rpcd_spoolss.1.1.1.1
>
> This seems to be a limitation/defect of logrotate itself.
> At first you had just log.rpcd_spoolss, and at first logrotate run
> it rotated it to log.rpcd_spoolss.1, - now you have 2 files - this
> rotated one and new log.rpcd_spoolss. Now there are two files which
> are covered by the above mask (log.rpcd_*), - so logrotate will try
> to rotate both of them.
From logrotate manpage:
Please use wildcards with caution. If you specify *, logrotate will
rotate all files, including previously rotated ones. A way around this
is to use the olddir directive or a more exact wildcard (such as *.log).
Do we really need logrotate scripts for samba anyway? With
`max log size' setting in place (which is 5000Kb by default), samba should
manage its own logfiles just fine, no?
/mjt
More information about the samba
mailing list