# Permissions for ES\_KEYSTORE\_PASSPHRASE\_FILE

**URL:** <https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 12, 2022, 6:16pm UTC](https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219 "2022-09-12T18:16:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tepus](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tepus](https://discuss.elastic.co/u/tepus)\
**Post date:** [September 12, 2022, 6:16pm UTC](https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219/1 "2022-09-12T18:16:43Z")

</div>

Dear Community,

our Keystore is protected with a password. In order to provide the password to the cluster and start it, we created the file _/etc/elasticsearch/my\_pwd\_file.tmp_ under _root:elasticsearch_ containing the password. Its permissions were set to 600, conforming to the [instructions](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/rpm.html#rpm-running-systemd) we follow. The cluster is being executed with _systemctl_ by root.

However, the cluster could not start. It was complaining with: _/etc/elasticsearch/my\_pwd\_file.tmp: permission denied_. By changing the permissions of the file to 640, the cluster started successfully. What could be the issue?

Greetings,  
Milos Tepavcevic

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [September 15, 2022, 4:30am UTC](https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219/2 "2022-09-15T04:30:52Z")

</div>

I believe elasticsearch runs under `elasticsearch:elasticsearch`, while your file is `root:elaticsearch`. You might want to change the ownership of the file, e.g.

```auto
chown elasticsearch:elasticsearch /etc/elasticsearch/my_pwd_file.tmp

```

---

<div class="post-metadata">

**Author:** ![tepus](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tepus](https://discuss.elastic.co/u/tepus)\
**Post date:** [October 10, 2022, 7:06pm UTC](https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219/3 "2022-10-10T19:06:26Z")

</div>

It's indeed that simple - 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:** [November 7, 2022, 7:06pm UTC](https://discuss.elastic.co/t/permissions-for-es-keystore-passphrase-file/314219/4 "2022-11-07T19:06:32Z")

</div>

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