CompTIA Linux+ (XK0-004) — Question 97

An administrator notices a directory on a web server named /var/www/html/old_reports that should no longer be accessible on the web. Which of the following commands will accomplish this task?

Answer options

Correct answer: D

Explanation

The correct answer is D because 'setenforce' is used to change the mode of SELinux, which can restrict access to the directory. Options A, B, and C do not address web access; A changes permissions to none, B changes the group ownership, and C changes the user ownership but doesn't specifically restrict web access.