(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
    
  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值