A Linux administrator needs to grant a user named 'jane' write access to a file called 'data.log', which is currently only accessible by its owner 'john'. The file should not have its existing permissions altered for any other user or group. Which of the following commands would correctly grant 'jane' the required access?
The correct answer is setfacl -m u:jane:w data.log because the setfacl command is used to set Access Control Lists, and -m is used to modify the ACL by adding a new rule. The rule u:jane:w specifies that the user 'jane' is given write (w) access. Using ACLs allows for extending the permission set beyond the traditional owner, group, and others model.
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 are Access Control Lists (ACLs)?
Open an interactive chat with Bash
What is the difference between 'chmod' and 'setfacl'?