Control Web Panel

WebPanel => CentOS 9 Problems => Topic started by: Starburst on April 17, 2025, 08:57:19 PM

Title: Logrotate not triggering
Post by: Starburst on April 17, 2025, 08:57:19 PM
AlmaLinux 9.5
CWP 0.9.8.1201

Config is located at: /etc/logrotate.d/httpd
Quote
/usr/local/apache/domlogs/*.log {
    missingok
    notifempty
    sharedscripts
    daily
    rotate 7
    postrotate
        /bin/systemctl reload httpd.service > /var/log/httpd-rotate.log 2>&1 || true
    endscript
    compress
}

But is not getting triggered automatically each night.
Trigger's manually without error.

When you check:
Code: [Select]
systemctl status logrotate
Quote
logrotate[811675]: error: failed to rename /usr/local/apache/domlogs/domain.com.log to /usr/local/apache/domlogs/domain.com.log-20250417: Read-only file
Only problem, is that file doesn't exit. Let alone be read only.

The other quirk is when you manually run it, it doesn't assign the date, just log.1.gz, log.2.gz, etc.