CompTIACompTIA
XK0-005 · Question #1884
XK0-005 Question #1884: Real Exam Question with Answer & Explanation
The correct answer is B: chown -R Ansible:Ansible /opt/Ansible. The -R flag applies the ownership change recursively, setting both the user and group of /opt/Ansible and all files/subdirectories within it to Ansible.
System Management
Question
A Linux administrator tries to install Ansible in a Linux environment. One of the steps is to change the owner and the group of the directory /opt/Ansible and its contents. Which of the following commands will accomplish this task?
Options
- Agroupmod -g Ansible -n /opt/Ansible
- Bchown -R Ansible:Ansible /opt/Ansible
- Cusermod -aG Ansible /opt/Ansible
- Dchmod -c /opt/Ansible
Explanation
The -R flag applies the ownership change recursively, setting both the user and group of /opt/Ansible and all files/subdirectories within it to Ansible.
Topics
#Linux commands#File ownership#Permissions#`chown` command
Community Discussion
No community discussion yet for this question.