Issue
Anacron job 'cron.daily' on vps-60c912d0.vps.ovh.net
Description: /etc/cron.daily/logrotate:
error: stat of /var/ossec/logs/active-responses.log failed: Permission denied
error: stat of /var/ossec/logs/ossec.log failed: Permission denied
Environment
- Imunify360
Solution
It seems not all permissions were allowed for SELinux.
1. Try to apply these settings to the directory with logs:
# checkmodule -M -m -o /var/imunify360/imunify360.mod /opt/imunify360/venv/share/imunify360/imunify360.te
# semodule_package -o /var/imunify360/imunify360.pp -m /var/imunify360/imunify360.mod
# semodule -i /var/imunify360/imunify360.pp
# semanage fcontext -a -t var_log_t '/var/ossec/logs(/.*)?'
# restorecon -Frvv /var/ossec/logs
2. Restart OSSEC on the server and Imunify360 service:
# systemctl restart ossec-hids
# service imunify360 restart
3. Check if the issue is resolved.
Cause
Incorrect SELinux permissions.
Useful links
Comments
0 comments
Please sign in to leave a comment.