# Exiting: Could not start registrar: Error loading state: open /filebeat/data/registry: permission denied

**URL:** https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349
**Category:** Beats
**Tags:** filebeat
**Created:** [October 22, 2018, 8:43am UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349 "2018-10-22T08:43:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sebastiaanspeck](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@sebastiaanspeck](https://discuss.elastic.co/u/sebastiaanspeck)
#### Post date: [October 22, 2018, 8:43am UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349/1 "2018-10-22T08:43:03Z")

</div>

When running `/filebeat --setup -e` It exits with the next error:

```
2018-10-22T10:19:29.306+0200	ERROR	instance/beat.go:743	Exiting: Could not start registrar: Error 
loading state: open /filebeat/data/registry: permission denied
Exiting: Could not start registrar: Error loading state: open /filebeat/data/registry: permission denied

```

I am running filebeat 6.4.2-darwin-x86\_64 on MacOS Mojave

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [October 22, 2018, 2:57pm UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349/2 "2018-10-22T14:57:40Z")

</div>

The registry file must belong to the filebeat user. The /filebeat/data filter is owned by filebeat.

Which user do you use to run filebeat?

Please share the output of `$ ls -la /filebeat/data` (run in Terminal).

---

<div class="post-metadata">

### Author: ![sebastiaanspeck](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@sebastiaanspeck](https://discuss.elastic.co/u/sebastiaanspeck)
#### Post date: [October 24, 2018, 8:19am UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349/3 "2018-10-24T08:19:07Z")

</div>

```
$ ls -la data
total 16
drwxr-x--- 4 root staff 128 Oct 24 09:54 .
drwxr-xr-x@ 16 sebastiaanspeck staff 512 Oct 24 09:54 ..
-rw------- 1 root staff 48 Oct 24 09:23 meta.json
-rw------- 1 root staff 3 Oct 24 09:54 registry
```

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [October 24, 2018, 6:45pm UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349/4 "2018-10-24T18:45:00Z")

</div>

The files are owned by root, but the directory is owned by sebastiaanspeck. When running `filebeat setup` with your user, you can not access the files. Fix users of directory and files to one user only. Use 'sudo' if you want to run filebeat as another user.

---

<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: [November 21, 2018, 6:45pm UTC](https://discuss.elastic.co/t/exiting-could-not-start-registrar-error-loading-state-open-filebeat-data-registry-permission-denied/153349/5 "2018-11-21T18:45:04Z")

</div>

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