httpd
The file context for httpd-content is system_u:object_r:httpd_sys_content_t:s0 (for read-only data) or system_u:object_r:httpd_sys_rw_content_t:s0 (for read-write data)
SElinux logging
SElinux logs all its actions to /var/log/audit/audit.log. You can find the relevant lines by grepping for 'avc'. To make sense of these lines there are two handy tools:
- audit2why reads a set of log lines on standard input and outputs the reason in natural language
- audit2allow reads a set of log lines and outputs a policy module that allows this particular access pattern
The usual cycle is as follows:
</var/log/audit/audit.log grep -i avc | audit2why
inspect the output. If there is an access that has to be allowed and fails because of a "Missing type enforcement (TE) allow rule" call
audit2allow -M <module name>
and enter the appropriate avc log line. Or
grep "something identifying the relevant lines uniquely" /var/log/audit/audit.log | audit2allow -M <module name>
In all cases module name can be freely chosen.