A user cannot delete a file owned by another user on a shared filesystem. The file's permissions are 644, and the directory has permissions 755 with the sticky bit set. Which action would allow the user to delete the file?
Sticky bit restricts deletion to file owners; removing it allows deletion by users with write access to the directory.
Why this answer
The sticky bit on a directory (chmod +t) restricts deletion so that only the file owner, directory owner, or root can delete files, regardless of directory write permissions. Since the user is not the file owner and the sticky bit is set, they cannot delete the file. Removing the sticky bit (chmod -t) allows any user with write permission on the directory to delete files within it, which the user already has because the directory's 755 permissions grant world execute and read, but the user needs write access on the directory to delete; however, with 755, the directory does not grant world write, so the user would also need write permission on the directory.
In this scenario, the directory permissions are 755 (owner write, group/other read+execute), so the user does not have write access to the directory. The correct action is to either add write permission for the user on the directory or remove the sticky bit, but the question implies the directory already has the necessary write for the user? Actually, 755 does not give others write; the user would need directory write. The only listed option that directly addresses the sticky bit restriction is removing it, but note that without directory write, deletion is still blocked.
The question likely assumes the user has directory write (e.g., via group membership) but the sticky bit prevents deletion. Thus, removing the sticky bit allows deletion if the user has directory write.
Exam trap
CompTIA often tests the misconception that file permissions (like write on the file) control deletion, when in reality deletion is governed by directory permissions and the sticky bit.
How to eliminate wrong answers
Option A is wrong because changing the directory's group to include the user does not grant the user write permission on the directory (755 gives group read+execute only) and does not override the sticky bit restriction; the user would still need directory write and the sticky bit would still block deletion. Option C is wrong because adding write permission for others on the file (chmod o+w) does not affect deletion; deletion is controlled by directory permissions and the sticky bit, not file permissions. Option D is wrong because changing the file's group to match the user's group does not give the user write permission on the directory or bypass the sticky bit; the user still cannot delete the file unless they own it or have directory write and the sticky bit is removed.