Change SELinux context for logs (#14128)

Change SELinux context for logs from httpd_sys_rw_content_t to httpd_log_t so logrotate is not blocked by SELinux with this blocking: `logrotate_t httpd_sys_rw_content_t:file open;`
This commit is contained in:
Félix Bouynot
2022-07-22 08:32:37 -05:00
committed by GitHub
parent 52f0dab2f8
commit 49a42c2dd6
+2 -1
View File
@@ -419,7 +419,8 @@ Feel free to tune the performance settings in librenms.conf to meet your needs.
```
semanage fcontext -a -t httpd_sys_content_t '/opt/librenms/html(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/opt/librenms/(logs|rrd|storage)(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/opt/librenms/(rrd|storage)(/.*)?'
semanage fcontext -a -t httpd_log_t "/opt/librenms/logs(/.*)?"
semanage fcontext -a -t bin_t '/opt/librenms/librenms-service.py'
restorecon -RFvv /opt/librenms
setsebool -P httpd_can_sendmail=1