# Elasticsearch unable to create temporary keystore

**URL:** https://discuss.elastic.co/t/elasticsearch-unable-to-create-temporary-keystore/359549
**Category:** Elasticsearch
**Created:** [May 15, 2024, 1:13pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-create-temporary-keystore/359549 "2024-05-15T13:13:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![daniela09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniela09/32/120636_2.png) [@daniela09](https://discuss.elastic.co/u/daniela09)
#### Post date: [May 15, 2024, 1:13pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-create-temporary-keystore/359549/1 "2024-05-15T13:13:46Z")

</div>

I have deployed EFK stack on Kubernetes, the EFK stack was turned off for few months in that time we changed the storage class we are using from GlusterFS to CephFS, the only thing I changed on the EFK stack is the storage class and I deleted the previous PVC it had, when I started the Statefulset for Elasticsearch I get this error

`ERROR: unable to create temporary keystore at [/usr/share/elasticsearch/config/elasticsearch.keystore.tmp], write permissions required for [/usr/share/elasticsearch/config] or run [elasticsearch-keystore upgrade]`

Do you know why is this happening and how can I solve it?

---

<div class="post-metadata">

### Author: ![daniela09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniela09/32/120636_2.png) [@daniela09](https://discuss.elastic.co/u/daniela09)
#### Post date: [May 16, 2024, 7:38am UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-create-temporary-keystore/359549/2 "2024-05-16T07:38:34Z")

</div>

I tried redeploying Elastic, but I still get the same error

---

<div class="post-metadata">

### Author: ![bingtan21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bingtan21/32/102306_2.png) [@bingtan21](https://discuss.elastic.co/u/bingtan21)
#### Post date: [October 2, 2024, 1:58pm UTC](https://discuss.elastic.co/t/elasticsearch-unable-to-create-temporary-keystore/359549/3 "2024-10-02T13:58:53Z")

</div>

I am also having this same issue, when following this docs reference:

```bash
docker run -it --rm \
-v full_path_to/config:/usr/share/elasticsearch/config \
docker.elastic.co/elasticsearch/elasticsearch:8.15.2 \
bin/elasticsearch-keystore create -p

```

The error is here:

```auto
ERROR: unable to create temporary keystore at [/usr/share/elasticsearch/config/elasticsearch.keystore.tmp], write permissions required for [/usr/share/elasticsearch/config] or run [elasticsearch-keystore upgrade], with exit code 78

```

> **[Install Elasticsearch with Docker | Elasticsearch Guide \[8.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-keystore-bind-mount)**
