XK0-005 · Question #420
XK0-005 Question #420: Real Exam Question with Answer & Explanation
The correct answer is A: chown user2:accounting script.sh. chown user2:accounting script.sh Sets the file owner to user2 (who maintains the script) and the group to accounting (which includes user1). chmod 750 script.sh ➤ Sets permissions to: 7 (owner = user2) → read, write, execute 5 (group = accounting) → read, execute only (no write)
Question
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?
Options
- Achown user2:accounting script.sh
- Bchown user1:accounting script.sh
- Cchown accounting:user1 script.sh
- Dchown user2:accounting script.sh
Explanation
chown user2:accounting script.sh Sets the file owner to user2 (who maintains the script) and the group to accounting (which includes user1). chmod 750 script.sh ➤ Sets permissions to: 7 (owner = user2) → read, write, execute 5 (group = accounting) → read, execute only (no write) 0 (others) → no permissions This setup ensures: Only user2 can modify the script. Members of accounting (like user1) can execute but not edit it. Other users have no access, as required.
Topics
Community Discussion
No community discussion yet for this question.