本文主要是介绍(20201222已解决)config file (“filebeat.yml“) must be owned by the user identifier (uid=0) or root,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
-
问题描述
在Filebeat 容器内运行:
./filebeat modules list
出现错误:
Error initializing beat: error loading config file: config file (“filebeat.yml”) must be owned by the user identifier (uid=0) or root
-
解决方案
ll
查看filebeat.yml权限为配置文件中的登录用户。From Config File Ownership and Permissions, to correct the problem you can use :
chown root filebeat.yml # or chown 0 filebeat.yml # 这里这个数值依据错误提示,可能有所不同
but another two problem raise:
-
chown: changing ownership of ‘filebeat.yml’: Read-only file system
To correct this problem:
这个read-only是启动容器的时候设置的,取消即可。
docker run -d --name=filebeat --user=root --volume="$(pwd)/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml:ro" # 修改为 docker run -d --name=filebeat --user=root --volume="$(pwd)/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml"
-
Error initializing beat: error loading config file: config file (“filebeat.yml”) can only be writable by the owner but the permissions are “-rwxrwxrwx” (to fix the permissions use: ‘chmod go-w /usr/share/fileb
eat/filebeat.yml’)上面已有提示:
chmod go-w /usr/share/filebeat/filebeat.yml
这篇关于(20201222已解决)config file (“filebeat.yml“) must be owned by the user identifier (uid=0) or root的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!