How to retain default selinux context for apache log files ?
Issue
- How to retain default selinux context as
httpd_log_t
for apache log files without writing a new file context ? - Will selinux policy be overwritten after adding
allow httpd_t httpd_log_t:file { read }
to the httpd_log_t type ? - HTTPD does not start after OS patch with
(13)Permission denied: AH00091: httpd: could not open error log file /path/to/log/file.
for custom log directory
AH00015: Unable to open logs
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Apache HTTPD 2.4
- Selinux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.