11.11 Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

All XK0-005 Test Inside CompTIA Questions

Page: 8 / 28
Total 376 questions

CompTIA Linux+ Exam Questions and Answers

Question 29

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:

A.

chown user2:accounting script.sh

chmod 750 script.sh

B.

chown user1:accounting script.sh

chmod 777 script.sh

C.

chown accounting:user1 script.sh

chmod 057 script.sh

D.

chown user2:accounting script.sh

chmod u+x script.sh

Question 30

A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

Options:

A.

docker rm --all

B.

docker rm $(docker ps -aq)

C.

docker images prune *

D.

docker rm --state exited

Question 31

A user is unable to remotely log on to a server using the server name server1 and port 22. The Linux engineer troubleshoots the issue and gathers the following information:

Which of the following is most likely causing the issue?

Options:

A.

server 1 is not in the DNS.

B.

sshd is running on a non-standard port.

C.

sshd is not an active service.

D.

serverl is using an incorrect IP address.

Question 32

A Linux administrator is configuring a log collector agent to monitor logs in /var/log/collector. The agent is reporting that it cannot write to the directory. The agent runs as the logger user account. The administrator runs a few commands and reviews the following output:

makefile

Output 1:

drwxr-xr-x. 1 root root 0 Oct 20:13 collector

Output 2:

file: /var/log/collector

owner: root

group: root

user::rwx

group::r-x

mask::rwx

other::r-x

Output 3:

uid=1010(logger) gid=1010(monitor) groups=1010(monitor)

Which of the following is the best way to resolve the issue?

Options:

A.

setfacl -Rm u:logger

/var/log/collector

B.

usermod -aG root logger

C.

chmod 644 /var/log/collector

D.

chown -R logger

/var/log

Page: 8 / 28
Total 376 questions