Security Engineering

A web server's httpd process cannot read content in a new /data/site directory, although file permissions allow it. The audit log shows AVC denials and SELinux is enforcing. What is the BEST fix?

Show the answer

Correct answerB. Relabel the directory with a file type the httpd domain may read

AWhy not this: Discretionary permissions already allow access; widening them does not change the SELinux label and creates exposure.

BWhy this is right: The AVC denial is a label mismatch; assigning the correct file type lets the confined httpd domain read the content.

CWhy not this: Allowlisting controls which binaries may run, not which files a confined process may read, so it does not clear the denial.

DWhy not this: Permissive mode logs but does not enforce, so it hides the problem and drops confinement on a production host.

SELinux decides access from security context labels. The new directory carries a type the httpd domain is not permitted to read, so relabeling it fixes the cause and keeps enforcement on. Permissive mode only stops the denials from blocking and removes the protection.