Courseiva
mediumMultiple ChoiceObjective-mapped

XK0-006 Practice Question: A security policy requires that all SUID files be…

A security policy requires that all SUID files be identified and reviewed. Which command can recursively find SUID files?

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

find / -perm /4000

'find / -perm /4000' searches for files with the SUID bit set (the / before the permission mask indicates that any of the bits in 4000 must be set). Option A uses permission 0777, which finds world-writable files, not SUID. Option C uses 'ls -lR | grep' to locate files with an 's' in the owner execute position, which does identify SUID files, but parsing 'ls' output is fragile and not the recommended method; the question asks for a command, and while it can work, it is less reliable than 'find'. Option D uses '-perm -2000' which matches files with the SGID bit set, not SUID.

Answer analysis

Option-by-option breakdown

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

  • find / -type f -perm 0777

    Why it's wrong here

    This finds world-writable files, not SUID.

  • find / -perm /4000

    Why this is correct

    This finds files with the SUID bit set (4000).

  • ls -lR | grep '^...s'

    Why it's wrong here

    Uses 'ls -lR | grep' to locate files with an 's' in the owner execute position. The -lR option enables recursive listing, so it does find SUID files recursively, but parsing 'ls' output is fragile and not the recommended method. The question asks for a command, and while it can work, 'find' is more reliable.

  • find / -perm -2000

    Why it's wrong here

    This finds SGID files, not SUID.

About these practice questions

One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.