Question 121 of 510
SecuritymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is `chmod 0755 /path/to/binary`. This command removes the SUID bit by explicitly setting the binary’s permissions to 0755, which omits the 4000 octal value that enables the setuid permission. When the SUID bit is set, a binary executes with the privileges of its owner—often root—allowing any user to run it with elevated rights, bypassing normal sudo or group restrictions. On the CompTIA Linux+ XK0-005 exam, this scenario tests your understanding of Linux file permissions and security hardening; a common trap is confusing `chmod u-s` (which also works) with numeric modes, but the exam often expects the octal form for precision. Remember that the SUID bit is represented by the 4000 octal digit, so any mode like 0755 or 755 that lacks that leading 4 will clear it. A quick memory tip: “No 4, no SUID”—if the first digit isn’t 4, the setuid bit is gone.

XK0-005 Security Practice Question

This XK0-005 practice question tests your understanding of security. 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 technician notices that a user can execute a binary with elevated privileges even though the user is not in the sudoers file. The binary has the SUID bit set. Which command would remove the SUID bit from the binary?

Clue words in this question

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

  • Clue: "which command"

    Why it matters: Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

Question 1mediummultiple choice
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

chmod 0755 /path/to/binary

Option D is correct because `chmod 0755` sets the binary's permissions to read/write/execute for the owner, and read/execute for group and others, which explicitly clears the SUID bit (setuid) by not including the 4000 octal value. The SUID bit allows a binary to run with the privileges of its owner (often root), bypassing normal user permissions. Removing it with a numeric mode like 0755 is a definitive way to ensure the SUID bit is unset, addressing the security issue where a non-sudo user can execute the binary with elevated privileges.

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.

  • chmod u-s /path/to/binary

    Why it's wrong here

    This is also correct, but the question expects the most common method.

  • chmod g-s /path/to/binary

    Why it's wrong here

    This removes the SGID bit, not SUID.

  • chmod o-s /path/to/binary

    Why it's wrong here

    This removes the sticky bit, not SUID.

  • chmod 0755 /path/to/binary

    Why this is correct

    This sets the mode to 0755, which does not include the SUID bit, effectively removing it.

    Clue confirmation

    The clue word "which command" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may think `chmod u-s` is the only correct way to remove the SUID bit, but the exam expects `chmod 0755` because it is a more comprehensive and explicit method that also resets the entire permission set, which is a common administrative practice to ensure no unintended special bits remain.

Detailed technical explanation

How to think about this question

The SUID (setuid) bit is represented by the octal value 4000 in Linux file permissions. When set on an executable, the process runs with the effective user ID of the file's owner (e.g., root), allowing a standard user to perform privileged actions. Using `chmod 0755` explicitly sets the permission bits to 0755, which is 0 (no special bits) + 755 (rwxr-xr-x), ensuring the SUID bit is cleared. In contrast, `chmod u-s` is a symbolic method that also works, but the numeric method is often preferred in scripting for its clarity and because it avoids accidentally leaving other special bits set.

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 small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

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 XK0-005 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 XK0-005 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 XK0-005 question test?

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

What is the correct answer to this question?

The correct answer is: chmod 0755 /path/to/binary — Option D is correct because `chmod 0755` sets the binary's permissions to read/write/execute for the owner, and read/execute for group and others, which explicitly clears the SUID bit (setuid) by not including the 4000 octal value. The SUID bit allows a binary to run with the privileges of its owner (often root), bypassing normal user permissions. Removing it with a numeric mode like 0755 is a definitive way to ensure the SUID bit is unset, addressing the security issue where a non-sudo user can execute the binary with elevated privileges.

What should I do if I get this XK0-005 question wrong?

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

Are there clue words in this question I should notice?

Yes — watch for: "which command". Tests specific CLI syntax. Recall the exact command and its required context — near-synonyms and partial matches are common distractors.

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 25, 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 XK0-005 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 XK0-005 exam.