π ~1 min read
Table of contents
Symptom & Impact
Logs are not rotated, increasing disk pressure and risking service disruption.
Environment & Reproduction
Appears after manual edits in /etc/logrotate.d or ownership changes.
Root Cause Analysis
Invalid directives, missing files, or permission problems abort rotation runs.
Quick Triage
Run logrotate in debug mode and inspect failing include file.
Step-by-Step Diagnosis
Pinpoint parsing or permission errors in rotation configs.
– shell: `sudo logrotate -d /etc/logrotate.conf`
– python: `python3 -c “import subprocess; print(subprocess.getoutput(‘sudo tail -n 80 /var/lib/logrotate/status’))”`
– perl: `perl -e ‘print q{Check create mode and su directives carefully}’`

Solution – Primary Fix
Correct config syntax and ownership, then force a safe test rotation.
– shell: `sudo logrotate -f /etc/logrotate.conf`
– python: `python3 -c “import subprocess; print(subprocess.getoutput(‘sudo find /etc/logrotate.d -type f -maxdepth 1’))”`
– perl: `perl -e ‘print q{Validate rotated files and service reload behavior}’`
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use package-managed defaults and minimize custom directives.
Verification & Acceptance Criteria
Scheduled rotation completes without errors and log growth is controlled.
Rollback Plan
Restore last known-good config set from version control backup.
Prevention & Hardening
Lint logrotate changes in CI and enforce peer review for production edits.
Related Errors & Cross-Refs
Related to journald growth and no-space-left incidents.
Related tutorial: View the step-by-step tutorial for debian-12.
View all debian-12 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
logrotate(8) and Debian logging policy documentation.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.