# Cannot create a repository in Elasticsearch in order to take a backup

**URL:** <https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353>\
**Category:** Elasticsearch\
**Created:** [September 27, 2019, 7:25am UTC](https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353 "2019-09-27T07:25:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ion\_popa](https://avatars.discourse-cdn.com/v4/letter/i/77aa72/32.png) [@ion\_popa](https://discuss.elastic.co/u/ion_popa)\
**Post date:** [September 27, 2019, 7:25am UTC](https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353/1 "2019-09-27T07:25:48Z")

</div>

Hello Elastic community,

I'm unable to create a repository in order to take a backup of my cluster. I do have root permissions to the cluster and yes, a backup share has been created which is shared across all nodes on the cluster. This is the error I'm getting (the company's also using Puppet for managing the configuration of the yaml files) but I'm getting the below error, **/backup** is the path in the path.repo config)

```
curl -X PUT "localhost:9200/_snapshot/backup?pretty" -H 'Content-Type: application/json' -d'

{

"type": "fs",

"settings": {

"location": "/backup"

}
}'
{
  "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" : "/backup/tests-eyEtjaA0TymhJwuNPOh95g"
    }
  },
  "status" : 500
}

```

Many thanks.

---

<div class="post-metadata">

**Author:** ![Armin\_Braun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/armin_braun/32/20092_2.png) [@Armin\_Braun](https://discuss.elastic.co/u/Armin_Braun)\
**Post date:** [September 30, 2019, 11:02am UTC](https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353/2 "2019-09-30T11:02:55Z")

</div>

Hi @ion_popa

It appears that the Elasticsearch process does not have the necessary permissions to write to the `/backup` path? Can you make make sure that the ES process's user+group has write permissions to `/backup`?

---

<div class="post-metadata">

**Author:** ![ion\_popa](https://avatars.discourse-cdn.com/v4/letter/i/77aa72/32.png) [@ion\_popa](https://discuss.elastic.co/u/ion_popa)\
**Post date:** [October 7, 2019, 10:44am UTC](https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353/3 "2019-10-07T10:44:43Z")

</div>

Hi @Armin - It's odd but when I initially gave it permissions **elasticsearch:elasticsearch** , it didn't work and threw the same error. It has eventually worked when I ran Puppet again and then re-added permissions to the backup folder for the **elasticsearch**. Thanks though 🙂 sorry for not updating this thread earlier.

---

<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 4, 2019, 10:44am UTC](https://discuss.elastic.co/t/cannot-create-a-repository-in-elasticsearch-in-order-to-take-a-backup/201353/4 "2019-11-04T10:44:52Z")

</div>

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