nerdexam
CompTIA

XK0-005 · Question #889

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…

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

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    87% (27)
  • C
    3% (1)
  • D
    3% (1)

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

#chown command#File ownership#Linux permissions#System administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice