logrotate script cause "Read-only file system" error while writing logs in /etc/ directory
Issue
-
logrotatepostrotate script cause "Read only filesystem" error while writing logs in/etc/directory, but same script works in RHEL 8, and it runs well in RHEL 9 with interactive execution./var/log/myservice/*.log { weekly rotate 7 ... postrotate sh /etc/myservice/myscript.sh <<==== this script output logs to /etc/myservice/log/*.log, and it fails with `Read-only file system` endscript }
Environment
- Red Hat Enterprise Linux 9
- logrotate
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.