CentOS logrotate with non-standard log folders

less than 1 minute read

I ran into an issue at $WORK today that took more than 5min of Googling to find an answer to, so you get two posts in one day!

On a CentOS (or RedHat) system, if you

a) setup logrotate to rotate log files in a folder not under /var/log, and
b) have selinux in enforcing mode

… then you will need to follow the instructions here to tell selinux to allow logrotate to operate on those files/folders.