CompTIA Linux+ (XK0-005) — Question 110
A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?
Answer options
- A. chmod +t /project/access2all
- B. chmod +rws /project/access2all
- C. chmod 2770 /project/access2all
- D. chmod ugo+rwx /project/access2all
Correct answer: A
Explanation
The correct answer is A, as setting the sticky bit with 'chmod +t' ensures that only the owner of a file can delete or rename it, regardless of group permissions. The other options do not provide the same level of file protection; for example, option B adds the setuid and setgid bits, while option C sets specific permissions but does not restrict deletion rights, and option D grants full permissions to everyone.