Security

A security administrator wants to protect /etc/resolv.conf on a server so that no user, including root, can modify, delete, or rename the file until the protection is deliberately removed. Which command accomplishes this?

Show the answer

Correct answerA. chattr +i /etc/resolv.conf

The immutable attribute (+i) blocks modification, deletion, renaming and linking of the file, even by root, until it is cleared with chattr -i. The append-only attribute (+a) is tempting but still permits data to be added to the file, so it does not fully lock it.