# Metricbeat setup --dashboards fails: error loading config file

**URL:** <https://discuss.elastic.co/t/metricbeat-setup-dashboards-fails-error-loading-config-file/284495>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [September 17, 2021, 3:12pm UTC](https://discuss.elastic.co/t/metricbeat-setup-dashboards-fails-error-loading-config-file/284495 "2021-09-17T15:12:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdalexndr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cdalexndr/32/55274_2.png) [@cdalexndr](https://discuss.elastic.co/u/cdalexndr)\
**Post date:** [September 17, 2021, 3:12pm UTC](https://discuss.elastic.co/t/metricbeat-setup-dashboards-fails-error-loading-config-file/284495/1 "2021-09-17T15:12:31Z")

</div>

```auto
λ docker exec -it docker_metricbeat_1 sh
sh-4.2# metricbeat setup --dashboards
Exiting: error loading config file: config file ("metricbeat.yml") can only be writable by the owner but the permissions are "-rwxrwxrwx" (to fix the permissions use: 'chmod go-w /usr/share/metricbeat/metricbeat.yml')

```

metricbeat.yml is mounted as read-only in docker-compose:

```auto
    volumes:
      - ./config/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro

```

Why is setup complaining `metricbeat.yml` is read-only?  
Setup shouldn't write to this file, so it should ignore write access.

Github issue: [https://github.com/elastic/beats/issues/23657](https://github.com/elastic/beats/issues/23657)

---

<div class="post-metadata">

**Author:** ![cdalexndr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cdalexndr/32/55274_2.png) [@cdalexndr](https://discuss.elastic.co/u/cdalexndr)\
**Post date:** [September 17, 2021, 3:15pm UTC](https://discuss.elastic.co/t/metricbeat-setup-dashboards-fails-error-loading-config-file/284495/2 "2021-09-17T15:15:30Z")

</div>

With metricbeat 7.10.1, the error is:  
`Exiting: error loading config file: config file ("metricbeat.yml") must be owned by the user identifier (uid=0) or root`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 15, 2021, 5:15pm UTC](https://discuss.elastic.co/t/metricbeat-setup-dashboards-fails-error-loading-config-file/284495/3 "2021-10-15T17:15:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
