CompTIA Linux+ (XK0-004) — Question 3

An administrator needs to create a shared directory in which all users are able to read, write, and execute its content but none of the regular users are able to delete any content.
Which of the following permissions should be applied to this shared directory?

Answer options

Correct answer: A

Explanation

The correct answer is A (rwxrwxrwt) because the 't' at the end sets the sticky bit, allowing users to only delete their own files within the directory. Option B (rwxrwxrws) includes the setgid bit but does not prevent deletion of files by users. Option C (rwxrwxrwx) grants full permissions to everyone, allowing deletions. Option D (rwxrwxrw*) lacks the execute permission for others, which is necessary for directory access.