nerdexam
Cisco

350-201(NEW-127Q) · Question #74

During an internal audit, an information security officer discovered that some non-authorized users have executable privileges on all files in the system, but the script did not work. What must the…

The correct answer is D. sudo -u $userspec find / -type f -executable. Option D is correct because find / -type f -executable is the proper command to recursively search the entire filesystem (/) for regular files (-type f) that have the executable bit set (-executable), and sudo -u $userspec runs that search in the context of the specified user…

Access Control

Question

During an internal audit, an information security officer discovered that some non-authorized users have executable privileges on all files in the system, but the script did not work. What must the security officer add to the script to find all the users?

Options

  • Asudo -u $userspec grep -lF executable
  • Bsudo -u $userspec grep -type executable
  • Csudo -u $userspec find / -type D -executable
  • Dsudo -u $userspec find / -type f -executable

How the community answered

(38 responses)
  • A
    3% (1)
  • B
    13% (5)
  • C
    8% (3)
  • D
    76% (29)

Explanation

Option D is correct because find / -type f -executable is the proper command to recursively search the entire filesystem (/) for regular files (-type f) that have the executable bit set (-executable), and sudo -u $userspec runs that search in the context of the specified user - revealing which files that user can execute.

Why the distractors fail:

  • A uses grep -lF executable, but grep searches file contents, not file permissions or metadata - it cannot detect executable bits at all.
  • B also misuses grep with a -type flag that grep doesn't even support; -type is a find option, not a grep option.
  • C uses -type D (capital D), which is invalid in find; the correct flag for directories is lowercase -type d - and the goal here is to find files, not directories anyway.

Memory tip: Think "Find Files, not Grep" - grep digs inside file content, while find interrogates file properties like type and permissions. When hunting for executable files on the filesystem, always reach for find -type f -executable.

Topics

#File Permissions#Linux Commands#Access Control#Privilege Audit

Community Discussion

No community discussion yet for this question.

Full 350-201(NEW-127Q) Practice