CompTIA Linux+ XK0-006 (V8) Practice Question

A company keeps SELinux in Enforcing mode on its web server. After moving the application's PostgreSQL database to a dedicated host (10.10.20.15:5432), the PHP code running under the httpd_t domain starts logging AVC denials similar to:

avc:  denied  { name_connect } for  pid=1234 comm="php-fpm" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:postgres_port_t:s0 tclass=tcp_socket

The security team insists that only the minimum SELinux privilege necessary be granted and that the change must survive reboots. Which single command satisfies all of these requirements?

  • setsebool -P httpd_can_network_connect_db on

  • semanage permissive -a httpd_t

  • semanage port -a -t http_port_t -p tcp 5432

  • setsebool -P httpd_can_network_connect on

CompTIA Linux+ XK0-006 (V8)
Security
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