I have a an application which is run as a systemd service on RHEL7 that makes use of the system journal for logging. To ease monitoring of this application I have configured
rsyslogd to write logs from this service (only) to a dedicated log file.
I would now like to serve this log file using
httpd so that users can easily monitor the application.
The problem I am facing is that no matter how I setup the file contexts it seems
selinux will prevent me from doing what I want:
rsyslogis allowed to write to
httpdis allowed to read from
As far as I can tell there is no context that will allow writing by
rsyslogd and reading from
What can I do to get around this problem? Will I end up needing to create a custom policy module?