Question 263 of 510
Security EngineeringhardMultiple SelectObjective-mapped

Quick Answer

The answer is to run the web server process under a dedicated non-privileged user account and apply mandatory access control (MAC) to restrict file permissions. This pairing enforces least privilege at both the user and kernel levels: the non-privileged user prevents root-level compromise, while MAC (such as SELinux or AppArmor) confines the process to only the files and system calls it absolutely needs, even if the user account itself is compromised. On the CompTIA SecurityX CAS-004 exam, this scenario tests your understanding of defense-in-depth for Linux web server hardening, where a common trap is to select only a user account change or only a firewall rule, forgetting that MAC provides granular, policy-based file permission enforcement that a standard user cannot bypass. A useful memory tip is “User for identity, MAC for boundaries”—the user account controls who runs the process, and MAC controls what that process can touch.

CAS-004 Security Engineering Practice Question

This CAS-004 practice question tests your understanding of security engineering. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.

A security engineer is hardening a Linux web server. The team requires that the web server process cannot run with root privileges and that any file it writes must have minimal permissions. Which two controls should be implemented together? (Select TWO).

Question 1hardmulti select
Full question →

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

Run the web server process under a dedicated non-privileged user account

Running the web server process under a dedicated non-privileged user account (Option A) ensures that even if the process is compromised, the attacker does not gain root privileges. This is a fundamental principle of least privilege, typically implemented by creating a system user (e.g., 'www-data' or 'httpd') with no login shell and assigning ownership of web directories to that user.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Run the web server process under a dedicated non-privileged user account

    Why this is correct

    This ensures the process does not run as root.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Place the web server in a chroot jail

    Why it's wrong here

    Chroot affects filesystem access, not user context.

  • Enable SELinux in enforcing mode with a targeted policy for the web server

    Why it's wrong here

    SELinux is a MAC system but the question asks for two controls; this is already covered by D.

  • Apply mandatory access control (MAC) to restrict file permissions

    Why this is correct

    MAC ensures minimal permissions even if the process is compromised.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use file capability bounding sets to limit the web server's capabilities

    Why it's wrong here

    This limits capabilities but does not change the user context.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse chroot jails (Option B) or SELinux (Option C) as substitutes for running the process as a non-root user, but neither addresses the core requirement of preventing root-level execution; the question explicitly requires the process to not run with root privileges, which only a dedicated non-privileged user account achieves.

Detailed technical explanation

How to think about this question

Under the hood, Linux user accounts are defined in /etc/passwd with a UID; a dedicated non-privileged user typically has UID > 1000 (or > 500 on older systems) and no valid shell (e.g., /sbin/nologin). When combined with mandatory access control (MAC) like SELinux or AppArmor (Option D), the process is further confined by a security policy that overrides discretionary access controls (DAC), ensuring that even if the user account is compromised, file writes are restricted to specific types and contexts. In a real-world scenario, a misconfigured web server running as root could allow an attacker to overwrite system binaries, while the combination of a non-root user and MAC prevents privilege escalation and limits damage to the web application's data.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A junior network technician can log in to a core router but cannot reach the enable prompt or configuration mode. The AAA server is authenticating the login — but the authorisation policy only grants privilege level 1, not 15. Authentication (who you are) is working; authorisation (what you can do) is not.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CAS-004 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 CAS-004 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 CAS-004 question test?

Security Engineering — This question tests Security Engineering — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Run the web server process under a dedicated non-privileged user account — Running the web server process under a dedicated non-privileged user account (Option A) ensures that even if the process is compromised, the attacker does not gain root privileges. This is a fundamental principle of least privilege, typically implemented by creating a system user (e.g., 'www-data' or 'httpd') with no login shell and assigning ownership of web directories to that user.

What should I do if I get this CAS-004 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Last reviewed: Jun 11, 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 CAS-004 practice question is part of Courseiva's free CompTIA 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 CAS-004 exam.