CompTIA Linux+ (XK0-004) — Question 90

Two specific users need access to a directory owned by root where backups are located. Which of the following commands would BEST ensure the specified users can access the backup files?

Answer options

Correct answer: D

Explanation

The best command to use in this situation is 'setfacl' as it allows for setting Access Control Lists (ACLs) that can provide specific users with permissions to access files or directories owned by another user, such as root. The 'chmod' command changes permissions for all users but does not allow for granularity in specifying individual users, while 'umask' sets default permissions for new files and 'chcon' is used for changing SELinux context, neither of which would solve the access issue directly.