A system administrator needs to secure the configuration file /etc/important.conf to prevent any modifications, including by root, because it contains sensitive system settings. Which command should the administrator execute to achieve this?
The chattr +i /etc/important.conf command is correct because it sets the immutable attribute on the file, which prevents any modifications, deletions, or renames, even by the root user, until the attribute is removed. This is a crucial tool for protecting critical system files. The +a attribute only allows appending to the file, not preventing all modifications. The +s attribute marks a file for secure deletion (overwriting with zeros), and the +d attribute marks a file to be skipped by the dump backup utility; neither of these prevents modification.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the chattr +i command do?
Open an interactive chat with Bash
How is the immutable +i attribute removed if necessary?
Open an interactive chat with Bash
What is the difference between the +i and +a attributes in chattr?