A system administrator, logged in as root, cannot modify or delete a critical configuration file. The rm and > commands both fail with an "Operation not permitted" error. Standard permissions, checked with ls -l, appear to be correct. Which of the following commands should the administrator use to check for extended file attributes, such as the immutable bit, which could be preventing the changes?
The correct command is lsattr. The lsattr command is used to list the extended attributes of a file on a Linux filesystem. If a file has the immutable attribute ('i') set, it cannot be modified, deleted, or renamed, not even by the root user. chattr is used to change these attributes, not to view them. getfacl is used to view file Access Control Lists (ACLs), which are a different permission mechanism. getsebool is used to view SELinux booleans, which are system-wide settings and not specific 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 immutable attribute ('i') do?
Open an interactive chat with Bash
How can the immutable attribute be removed from a file?
Open an interactive chat with Bash
What is the difference between ACLs and extended file attributes?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access