CompTIA Security+ (SY0-601) — Question 107
During a security assessment, a security analyst finds a file with overly permissive permissions. Which of the following tools will allow the analyst to reduce the permissions for the existing users and groups and remove the set-user-ID bit from the file?
Answer options
- A. ls
- B. chflags
- C. chmod
- D. lsof
- E. setuid
Correct answer: C
Explanation
The correct answer is C, chmod, as it is specifically designed to change file permissions and can also be used to modify the set-user-ID bit. The other options do not provide the functionality needed for altering permissions in this manner: A (ls) lists files, B (chflags) changes file flags, D (lsof) lists open files, and E (setuid) refers to a permission type rather than a command.