Courseiva
System Management →mediumMultiple Select

XK0-006 System Management Practice Question

A user has a file with permissions set to 644. Which of the following commands will add the setuid permission to the file? (Choose two.)

⚠ Common exam trap

Watch out — candidates often confuse the octal values for setuid (4000), setgid (2000), and sticky (1000); candidates often pick 2644 or 1644 by mixing up which bit corresponds to which special permission.

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 u+s file

Option A, chmod u+s file, is correct because the u+s symbolic mode adds the setuid bit to the user (owner) permission triad, which is exactly the setuid permission requested. Option D, chmod 4644 file, is correct because in the four-digit octal notation the leading digit represents special permissions, and the value 4 in that position is the setuid bit, so 4644 sets setuid while preserving the existing 644 rw-r--r-- permissions. Option B, chmod g+s file, is wrong because g+s sets the setgid bit on the group triad, not setuid. Option C, chmod 1644 file, is wrong because the leading 1 sets the sticky bit, not setuid. Option E, chmod 2644 file, is wrong because the leading 2 sets the setgid bit, not setuid.

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 file

    Why this is correct

    `chmod u+s file` sets the setuid bit on the file's owner-execute position, satisfying the stem's requirement to add setuid to a 644 file. The symbolic `u+s` form targets only the user (owner) permission triad, leaving the existing read and write bits untouched, which is precisely the operation requested.

  • ✗

    chmod g+s file

    Why it's wrong here

    The g+s symbolic form sets setgid, which changes group inheritance, not setuid. It tempts because both are special permission bits applied with chmod, and g+s would be correct for making files in a directory inherit the directory's group.

  • ✗

    chmod 1644 file

    Why it's wrong here

    The leading octal digit 1 sets the sticky bit, not setuid; setuid uses 4, so 1644 leaves the file without it. It tempts because a fourth digit does modify special bits, and 1644 would be correct for adding the sticky bit to a shared directory.

  • ✓

    chmod 4644 file

    Why this is correct

    Octal 4644 sets the setuid bit (4) alongside the existing 644 permissions, satisfying the stem's requirement to add setuid without altering owner, group or other access. The leading digit in four-digit octal notation represents setuid, setgid and sticky bits, so 4644 yields rwSr--r-- on the file.

  • ✗

    chmod 2644 file

    Why it's wrong here

    The leading digit 2 sets setgid, not setuid; setuid requires 4, so 2644 grants the wrong special bit. It tempts because a fourth octal digit does add special permissions, and 2644 would be correct for setting setgid on the file.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 781 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This XK0-006 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-006 exam.