CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux administrator is containerizing an internal web application with Podman. The application must be able to read and write user-generated files that live on the host at /srv/dbfiles, but no other container should ever have access to those files. The first test run was launched with:

podman run -d -v /srv/dbfiles:/var/lib/appdata mycorp/web:latest

The container started, but the application immediately logged "Permission denied" when trying to open files in /var/lib/appdata. Audit logs show SELinux AVC denials for /srv/dbfiles. Which modification to the run command will both fix the SELinux denial and keep the files private to this single container?

  • Add the :z option: -v /srv/dbfiles:/var/lib/appdata:z

  • Add the :Z option: -v /srv/dbfiles:/var/lib/appdata:Z

  • Replace the bind mount with a named volume created by podman volume create appdata

  • Make the mount read-only: -v /srv/dbfiles:/var/lib/appdata:ro

CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot