CentOS 6: Logrotate / Selinux Problem

Home » CentOS » CentOS 6: Logrotate / Selinux Problem
CentOS No Comments

Ever since a recent power failure I have been getting a Logrotate error. My machine is on a UPS — it shutdown cleanly, but I suspect that its BIOS/RTC
battery is dead, since the machine came up thinking it was 1982 :-(. I reset the clock and everything is fine, *except* I had to delete Logrotate’s state files (which had bad dates). But now Logrotate is raising the error:

error: error creating unique temp file: Permission denied

and audit.log contains these messages:

type=AVC msg=audit(1541925899.209:28416): avc: denied { create } for pidR81 comm=”logrotate” name=”logrotate_temp.bPbOYF” scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file type=SYSCALL msg=audit(1541925899.209:28416): arch