SELinux blocking logrotate on samba share
Issue
- Custom logs are not being rotated when SELinux is enabled. The directory containing the logs is also being shared via Samba. we can't set two contexts on a directory: public_content_rw_t (for samba) and var_log_t (required by logrotate)
- The directory is /proj/jenkins/var/log/jenkins (symlinked in /var/log/)
- The issue happens every time that logrotate tries to rotate log files. This issue is happening on multiple servers that meet the criteria (Custom log shared via samba)
- The logs aren't getting rotated so files are growing in size. Fixing this without disabling Samba or opening things to the whole world would be ideal.
Environment
- Red Hat Enterprise Linux 6.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.