ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 324 - XK0-005 discussion

Report
Export

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?

A.

setfacl -Rm u:logger /var/log/collector

Answers
A.

setfacl -Rm u:logger /var/log/collector

B.

usermod -aG root logger

Answers
B.

usermod -aG root logger

C.

chmod 644 /var/log/collector

Answers
C.

chmod 644 /var/log/collector

D.

chown -R logger /var/log

Answers
D.

chown -R logger /var/log

Suggested answer: A

Explanation:

The issue is that the logger user does not have write permissions to /var/log/collector. Using setfacl (Access Control Lists) allows fine-grained control over file permissions, granting the logger user the necessary read-write access to the directory without changing the owner or group.

asked 09/10/2024
Junwei Li
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first