CompTIA Linux+ (XK0-005) — Question 39

User1 is a member of the accounting group. Members of this group need to be able to execute but not make changes to a script maintained by User2. The script should not be accessible to other users or groups. Which of the following will give proper access to the script?

Answer options

Correct answer: A

Explanation

Option A is correct because it changes the ownership of the script to User2 and the accounting group, and sets permissions so that the owner has full access, the group can execute, and others have no access. Option B is incorrect as it grants all users full permissions, which violates the requirement for exclusivity. Option C misconfigures ownership and applies permissions that do not allow execution. Option D only grants execute permission to the owner without considering the group, leaving the accounting group unable to run the script.