Services and User Management

On a RHEL server with SELinux enforcing, an administrator starts a rootless Podman container with the bind mount -v /srv/site:/usr/share/nginx/html. The web server returns permission denied, and the audit log shows an AVC denial. The /srv/site directory carries the default var_t type. Which change BEST fixes the problem while keeping SELinux enforcing?

Show the answer

Correct answerD. Append :Z to the volume option so Podman relabels the directory with container_file_t

The :Z option makes Podman relabel the host directory with container_file_t (private to that container), which SELinux allows containers to access. Changing file permissions with chmod does not affect an SELinux type denial, so the AVC denial would continue.