# Unable to create the repository for snapshots after mounting nfs share in the container

**URL:** <https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284>\
**Category:** Elasticsearch\
**Tags:** docker, snapshot-and-restore\
**Created:** [August 17, 2022, 12:39pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284 "2022-08-17T12:39:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhagya\_09](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bhagya\_09](https://discuss.elastic.co/u/Bhagya_09)\
**Post date:** [August 17, 2022, 12:39pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/1 "2022-08-17T12:39:31Z")

</div>

curl -k -u elastic:password -XPUT "[http://localhost:9200/\_snapshot/backupes?pretty](http://localhost:9200/_snapshot/backupes?pretty)" -H 'Content-Type: application/json' -d'{"type": "fs","settings":{"location": "/es\_snapshots"}}'  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "exception",  
"reason" : "failed to create blob container"  
}  
],  
"type" : "exception",  
"reason" : "failed to create blob container",  
"caused\_by" : {  
"type" : "access\_denied\_exception",  
"reason" : "/es\_snapshots/tests-uV-VWrk0QMGZgOY6KwPjgg"  
}  
},  
"status" : 500  
}

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [August 17, 2022, 12:46pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/2 "2022-08-17T12:46:03Z")

</div>

> [@Bhagya\_09](#):
>
> "caused\_by" : {  
> "type" : "access\_denied\_exception",

Here is reason.

---

<div class="post-metadata">

**Author:** ![Bhagya\_09](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bhagya\_09](https://discuss.elastic.co/u/Bhagya_09)\
**Post date:** [August 17, 2022, 3:31pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/3 "2022-08-17T15:31:11Z")

</div>

I have given the full permissions for /es\_snapshots with root as an owner still unable to create the registry with the curl command

.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8b3ac26c82d319fb90a97836406bb8036f93e4f.png)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 17, 2022, 4:21pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/4 "2022-08-17T16:21:39Z")

</div>

Most likely, elasticsearch is not running as `root` as this would refuse to start.

Note that all nodes must be able to write to this dir.

---

<div class="post-metadata">

**Author:** ![Bhagya\_09](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bhagya\_09](https://discuss.elastic.co/u/Bhagya_09)\
**Post date:** [August 17, 2022, 5:04pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/5 "2022-08-17T17:04:47Z")

</div>

yeah i understand but how will i identify the with what user it is running  
and i am using only single node as the data,ingest for elasticsearch

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 17, 2022, 5:17pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/6 "2022-08-17T17:17:53Z")

</div>

I believe that depending on how you installed elasticsearch, the user might be `elasticsearch`.

---

<div class="post-metadata">

**Author:** ![Bhagya\_09](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bhagya\_09](https://discuss.elastic.co/u/Bhagya_09)\
**Post date:** [August 17, 2022, 5:31pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/7 "2022-08-17T17:31:31Z")

</div>

okay got it i have created the user as elastic and after deployment i exec into the pod and run the /passwords

so , if change to chown like below will it work

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/a/baf075530b4d9e1cc856a9c7dec752ec48ffec03.png)

---

<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:** [September 14, 2022, 5:32pm UTC](https://discuss.elastic.co/t/unable-to-create-the-repository-for-snapshots-after-mounting-nfs-share-in-the-container/312284/8 "2022-09-14T17:32:27Z")

</div>

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