Question 289 of 537
Manage securityhardMultiple ChoiceObjective-mapped

SELinux Context for CGI Scripts — httpd_sys_script_exec_t

This EX200 practice question tests your understanding of manage security. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: sELinux context. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

$ ls -Z /var/www/cgi-bin/test.cgi
system_u:object_r:httpd_sys_content_t:s0

Refer to the exhibit. A CGI script located at /var/www/cgi-bin/test.cgi fails to execute. What is the most likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Exhibit

$ ls -Z /var/www/cgi-bin/test.cgi
system_u:object_r:httpd_sys_content_t:s0

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The SELinux context should be httpd_sys_script_exec_t.

SELinux contexts control which processes can access files and directories. The CGI script at /var/www/cgi-bin/test.cgi requires the httpd_sys_script_exec_t context to allow the Apache HTTP server (httpd) to execute it. Without this context, SELinux will deny execution even if file permissions and ownership are correct.

Key principle: SELinux context

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The script is in the wrong directory.

    Why it's wrong here

    The directory /var/www/cgi-bin is standard for CGI scripts.

  • The SELinux context should be httpd_sys_script_exec_t.

    Why this is correct

    Executable CGI scripts need the exec_t context.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    SELinux context

  • The script is not marked as executable.

    Why it's wrong here

    Even if executable, SELinux would block it with the wrong context.

  • The file permissions are incorrect.

    Why it's wrong here

    There is no indication of permission issues; the error is likely SELinux-related.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The pitfall in this question is that examinees often focus on file permissions or script location, overlooking that SELinux contexts (specifically httpd_sys_script_exec_t) are required for CGI execution in Red Hat systems.

Detailed technical explanation

How to think about this question

SELinux uses security contexts stored in extended attributes (e.g., user:role:type:level). For CGI scripts, the type must be httpd_sys_script_exec_t so that the httpd_t domain can transition to the httpd_sys_script_t domain upon execution. This is enforced by the kernel's LSM (Linux Security Module) framework, and misconfiguration is a common cause of 'Permission denied' errors in /var/log/audit/audit.log.

KKey Concepts to Remember

  • SELinux context
  • httpd_sys_script_exec_t

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

SELinux context

Real-world example

How this comes up in practice

A security administrator must allow nursing staff to reach a patient records server while blocking access from the guest Wi-Fi VLAN. After applying an extended ACL, traffic is still blocked from nursing workstations. The ACL was applied outbound instead of inbound on the wrong interface. Questions like this test ACL direction and placement rules.

What to study next

Got this wrong? Here's your next step.

Review sELinux context, then practise related EX200 questions on the same topic to reinforce the concept.

Related practice questions

Related EX200 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free EX200 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this EX200 question test?

Manage security — This question tests Manage security — SELinux context.

What is the correct answer to this question?

The correct answer is: The SELinux context should be httpd_sys_script_exec_t. — SELinux contexts control which processes can access files and directories. The CGI script at /var/www/cgi-bin/test.cgi requires the httpd_sys_script_exec_t context to allow the Apache HTTP server (httpd) to execute it. Without this context, SELinux will deny execution even if file permissions and ownership are correct.

What should I do if I get this EX200 question wrong?

Review sELinux context, then practise related EX200 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

SELinux context

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More EX200 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This EX200 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX200 exam.