An administrator wants to prevent users from creating hard links to a certain sensitive file on a Linux system. Which command should the administrator use to achieve this security measure?
The correct answer is chattr +i /path/to/file. The chattr command changes the file attributes on a Linux file system. The +i attribute makes a file immutable, which means that the file can neither be modified nor deleted, and new links cannot be created to it. This is an advanced method for securing files that are not commonly modified but are critical to system security. The incorrect options either do not directly apply to the prevention of hard link creation, use an incorrect attribute, or are unrelated to file attributes.
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' command do in Linux?
Open an interactive chat with Bash
What does the immutable attribute (+i) actually mean?