CompTIA Linux+ XK0-006 (V8) Practice Question

While deploying two Docker containers on a CentOS Stream 9 host with SELinux in enforcing mode, you bind-mount the same host directory into each container with the option:

-v /srv/shared-data:/data:Z

The first container can create and read files under /data, but the second container receives "Permission denied" errors when it tries to access those files. Setting SELinux to permissive mode makes the error disappear, but you must keep SELinux enforcing. Which change to the volume specification will allow both containers to share the directory without disabling SELinux?

  • Mount the directory with the suffix ":z" instead of ":Z" ( -v /srv/shared-data:/data:z ).

  • Add the option --security-opt label=disable to each container.

  • Keep ":Z" but append the read-only flag ( -v /srv/shared-data:/data:Z,ro ).

  • Start both containers with the --privileged flag so SELinux no longer blocks the access.

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