You need to prevent a standard user from accidentally deleting a critical configuration file owned by root. Which command ensures the file cannot be modified or deleted even by the root user?
`chattr +i` sets the immutable attribute in the ext4 inode, blocking writes, renames and unlinks at the filesystem layer — even for root, until the attribute is cleared. This satisfies the stem's constraint that the file survive deletion by root, which standard Unix permissions cannot enforce.
Why this answer
The 'chattr +i' command sets the immutable attribute on a file, which prevents any modification, deletion, renaming, or even linking — even by the root user — until the attribute is removed with 'chattr -i'. This is the only option that satisfies the requirement of protecting the file from root itself.
Exam trap
The trap is assuming root is all-powerful — candidates pick chmod 400 or chown root:root thinking root ownership or read-only permissions stop root, but only filesystem attributes like +i can override root.
How to eliminate wrong answers
Option A is wrong because changing ownership to root:root does not prevent root from modifying or deleting the file — root can always override permissions. Option B is wrong because chmod 400 makes the file read-only for the owner, but root can still write to it or delete it (deletion depends on directory permissions, and root bypasses them). Option C is wrong because umask 000 makes newly created files more permissive, the opposite of protection, and it does not affect existing files.