nerdexam
CompTIA

XK0-005 · Question #694

A Linux administrator is configuring a log collector agent to monitor logs in /var/log/collector. The agent is reporting that it cannot write in the directory. The agent runs as the logger user…

The correct answer is A. setfacl -Rm u:logger. 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…

Troubleshooting

Question

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

Output 1:

Output 2:

  • file: /var/log/collector
  • owner: root
  • group: root

user::rwx group::r-x mask::rwx other::r-x default:user:rwx default:group::r-x default:mask::rwx default: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

  • Asetfacl -Rm u:logger
  • Busermod -aG root logger
  • Cchmod 644 /var/log/collector
  • Dchown -R logger

How the community answered

(35 responses)
  • A
    43% (15)
  • B
    14% (5)
  • C
    9% (3)
  • D
    34% (12)

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.

Topics

#Linux Permissions#Access Control Lists (ACLs)#Troubleshooting#File System Management

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice