# Filebeat keystore permissions

**URL:** <https://discuss.elastic.co/t/filebeat-keystore-permissions/262962>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 2, 2021, 10:58am UTC](https://discuss.elastic.co/t/filebeat-keystore-permissions/262962 "2021-02-02T10:58:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coyz](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Coyz](https://discuss.elastic.co/u/Coyz)\
**Post date:** [February 2, 2021, 10:58am UTC](https://discuss.elastic.co/t/filebeat-keystore-permissions/262962/1 "2021-02-02T10:58:12Z")

</div>

Hello,

i'm trying to setup filebeat as non root user.

Here the service file ;

```auto
[Unit]
Description=Filebeat sends log files to Logstash or directly to Elasticsearch.
Documentation=https://www.elastic.co/products/beats/filebeat
Wants=network-online.target
After=network-online.target

[Service]

Environment="BEAT_LOG_OPTS="
Environment="BEAT_CONFIG_OPTS=-c /etc/filebeat/filebeat.yml"
Environment="BEAT_PATH_OPTS=-path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat"
ExecStart=/usr/share/filebeat/bin/filebeat $BEAT_LOG_OPTS $BEAT_CONFIG_OPTS $BEAT_PATH_OPTS
Restart=always
User=filebeat
Group=filebeat_group
[Install]
WantedBy=multi-user.target

```

Here the permission access on /etc/filebeat

```auto
-rwx------. 1 filebeat filebeat_group 2,3M 23 sept. 01:19 fields.yml
-rwx------. 1 filebeat filebeat_group 112K 23 sept. 01:19 filebeat.reference.yml
-rwx------. 1 filebeat filebeat_group 9,9K 21 déc. 10:06 filebeat.yml
-rw-r-----. 1 filebeat filebeat_group 9,9K 21 déc. 10:06 filebeat.yml.bck
-rwx------. 1 filebeat filebeat_group 8,8K 23 sept. 01:19 filebeat.yml.rpmnew
drwx------. 2 filebeat filebeat_group 4,0K 13 oct. 09:35 modules.d

```

Here the permission access on /var/lib/filebeat

```auto
-rwx------. 1 filebeat filebeat_group 314 13 nov. 09:51 filebeat.keystore
-rwx------. 1 filebeat filebeat_group 48 21 sept. 09:44 meta.json
drwx------. 3 filebeat filebeat_group 21 5 nov. 09:19 registry

```

Here is the error message ;

```auto
Exiting: could not initialize the keystore: file ("/var/lib/filebeat/filebeat.keystore") can only be writable and readable by the owner but the permissions are "-rwx------" (to fix the permissions use: 'chmod go-wrx /var/lib/filebeat/filebeat.keystore')`

```

But as you see, the permission folder and file is good. I try chmod go-wrx but as expected nothing change on permission file and folder.

Any idea ?

Thanks

---

<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:** [March 3, 2021, 3:52pm UTC](https://discuss.elastic.co/t/filebeat-keystore-permissions/262962/3 "2021-03-03T15:52:14Z")

</div>

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