filebeat-Ubuntu 18.04上的权限被拒绝错误

时间:2019-03-20 02:02:40

标签: elasticsearch ubuntu-18.04 filebeat

运行filebeat时遇到以下错误

$ filebeat test config

2019-03-20 01:57:12.112399037 +0000 UTC m=+0.016941991 write error: failed to open new file: open /var/log/filebeat/filebeat: permission denied
2019-03-20 01:57:12.112659642 +0000 UTC m=+0.017202599 write error: failed to open new file: open /var/log/filebeat/filebeat: permission denied
Exiting: Beat meta file failed to open: open /var/lib/filebeat/meta.json: permission denied

有人知道如何解决吗?

1 个答案:

答案 0 :(得分:0)

sudo filebeat test config

只要文件的所有者是root,上面的命令应该可以工作。