# Azure Repository Plugin access denied to elasticsearch.keystore

**URL:** <https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904>\
**Category:** Elasticsearch\
**Created:** [September 25, 2018, 9:12pm UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904 "2018-09-25T21:12:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonmichaelhunter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonmichaelhunter/32/33524_2.png) [@brandonmichaelhunter](https://discuss.elastic.co/u/brandonmichaelhunter)\
**Post date:** [September 25, 2018, 9:12pm UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904/1 "2018-09-25T21:12:57Z")

</div>

I've installed Azure Repository plugin into my 6.4 ES instance on my Ubuntu 16.04.5 LTS box which is hosted inside of a VM in Azure. I'm trying to perform backups and restores using a storage account I created in azure. When I try to set the account and key values I get the following error from the console:  
"Exception in thread 'main' java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore".  
I've tried running on sudo and still the same error.

Provided below is an the error when I try to set the account value from a txt file and the permissions set on the /etc/elasticsearch/elasticsearch.keystore, /etc/elasticsearch and /usr/share/elasticsearch/bin folders.  
 ![ElasticSearchProblem](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d16b8e7f8286d7595a41be798e4eb74b1c673aea.png)

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [September 25, 2018, 10:11pm UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904/2 "2018-09-25T22:11:58Z")

</div>

What are the permissions of /etc/elasticsearch (not the contents)?

---

<div class="post-metadata">

**Author:** ![brandonmichaelhunter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonmichaelhunter/32/33524_2.png) [@brandonmichaelhunter](https://discuss.elastic.co/u/brandonmichaelhunter)\
**Post date:** [September 26, 2018, 12:28am UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904/3 "2018-09-26T00:28:44Z")

</div>

![ESPermissionsonEtcElasticSearch](https://us1.discourse-cdn.com/elastic/original/3X/5/3/53eb71713db19e64c26f6d29e672b77e3163ea86.png)  
 ![ESFolderPermissionOnElasticSearch](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a1bf2b7a1ce78f7292ef234aa280660180bc15ce.png)

See the images above.  
The first one is the permissions on the file permissions within the /etc/elasticsearch folder and the second is the folder permissions for elasticsearch.

---

<div class="post-metadata">

**Author:** ![brandonmichaelhunter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandonmichaelhunter/32/33524_2.png) [@brandonmichaelhunter](https://discuss.elastic.co/u/brandonmichaelhunter)\
**Post date:** [September 27, 2018, 7:40pm UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904/4 "2018-09-27T19:40:44Z")

</div>

0down vote[accept](javascript:void(0)😉

I'd resolved my issue by updating the following permissions on the elasticsearch.keystore file. Tell me if this is the right way to do it..

```auto
sudo chmod a+rwx /etc/elasticsearch/elasticsearch.keystore - All Users
sudo chmod u+rwx /etc/elasticsearch/elasticsearch.keystore - Group
sudo chmod g+rwx /etc/elasticsearch/elasticsearch.keystore - Owner

```

---

<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:** [October 25, 2018, 7:41pm UTC](https://discuss.elastic.co/t/azure-repository-plugin-access-denied-to-elasticsearch-keystore/149904/5 "2018-10-25T19:41:01Z")

</div>

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