Affected versions: Debian 12

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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}’`

Illustrative mockup for debian-12 β€” terminal_or_console
Diagnosis commands for post 166 β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for debian-12 β€” log_or_dashboard
Fix validation evidence for post 166 β€” Illustrative mockup β€” Progressive Robot

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 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.