📖 ~1 min read
Table of contents
Symptom & Impact
Logs do not rotate as expected, increasing disk pressure and retention risk.
Environment & Reproduction
Appears when custom app logs have incorrect owner/group or mode settings.
sudo logrotate -d /etc/logrotate.conf
Root Cause Analysis
logrotate cannot read or rotate target logs due to ACL, owner, or path issues.
Quick Triage
Check failing file paths and permissions reported in dry-run output.
sudo logrotate -d /etc/logrotate.conf | tail -n 80
Step-by-Step Diagnosis
Inspect ownership and app write behavior for failing log files.
ls -l /var/log
namei -l /var/log/.log

Solution – Primary Fix
Correct ownership, ensure create directives match runtime user, and rerun rotate.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo chown : /var/log/.log
sudo logrotate -f /etc/logrotate.conf

Solution – Alternative Approaches
Use copytruncate for processes that cannot reopen log descriptors.
sudo grep -R 'copytruncate' /etc/logrotate.d 2>/dev/null
Verification & Acceptance Criteria
Rotation creates new files with expected mode and no errors.
sudo logrotate -f /etc/logrotate.conf
ls -l /var/log | head
Rollback Plan
Restore previous logrotate snippet if application logging regresses.
sudo cp /etc/logrotate.d/.bak /etc/logrotate.d/
Prevention & Hardening
Standardize app log ownership and validate snippets before deploy.
sudo logrotate -d /etc/logrotate.conf
Related Errors & Cross-Refs
Related to skipping because parent directory has insecure permissions and permission denied.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu logrotate and system logging 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.