gpt4 book ai didi

linux - 无法读取文件 Datadog 代理

转载 作者:行者123 更新时间:2023-12-04 19:24:38 27 4
gpt4 key购买 nike

按照本指南设置日志文件的 dd-agent 权限后 https://docs.datadoghq.com/logs/guide/setting-file-permissions-for-rotating-logs/ ,我仍然得到:

- Type: file
Path: /home/ubuntu/Projects/livestream/nohup.out
Status: Error: cannot read file /home/ubuntu/Projects/livestream/nohup.out: stat /home/ubuntu/Projects/livestream/nohup.out: permission denied
BytesRead: 0
Average Latency (ms): 0
24h Average Latency (ms): 0
Peak Latency (ms): 0
24h Peak Latency (ms): 0
我已确认已设置权限:
# file: Projects/livestream/
# owner: ubuntu
# group: ubuntu
user::rwx
user:dd-agent:r-x
group::rwx
group:dd-agent:r-x
mask::rwx
other::rwx

ubuntu@ip-172-31-38-150:~$ getfacl Projects/livestream/nohup.out
# file: Projects/livestream/nohup.out
# owner: ubuntu
# group: ubuntu
user::rwx
user:dd-agent:r-x
group::---
group:dd-agent:r-x
mask::rwx
other::rwx

getfacl Projects/
# file: Projects/
# owner: ubuntu
# group: ubuntu
user::rwx
user:dd-agent:r-x
group::rwx
group:dd-agent:r-x
mask::rwx
other::r-x

sudo systemctl restart datadog-agent
sudo datadog-agent status
它无法读取文件可能发生了什么?

最佳答案

我在 Ubuntu 22.04 上遇到了类似的问题。我解决了添加dd-agent在 Ubuntu 组上

sudo usermod -aG ubuntu dd-agent 

关于linux - 无法读取文件 Datadog 代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72274423/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com