LPIC-2 Exam 202 (Linux Engineer) — Question 90
In order to prevent all anonymous FTP users from listing uploaded file names, what security precaution can be taken when creating an upload directory?
Answer options
- A. The directory must not have the execute permission set.
- B. The directory must not have the read permission set.
- C. The directory must not have the read or execute permission set.
- D. The directory must not have the write permission set.
- E. The directory must not contain other directories.
Correct answer: B
Explanation
The correct answer is B because without read permission, anonymous users cannot list the files in the directory. Option A is incorrect as not having execute permission alone does not prevent file listing. Option C is too restrictive as it also denies execute permission, which is unnecessary for this scenario. Option D is incorrect because write permission is unrelated to listing files. Option E does not address the permissions needed to secure the directory.