# How to create a snapshot so that group has write permission?

**URL:** <https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368>\
**Category:** Elasticsearch\
**Created:** [June 30, 2016, 7:26am UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368 "2016-06-30T07:26:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert.volkmann](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@robert.volkmann](https://discuss.elastic.co/u/robert.volkmann)\
**Post date:** [June 30, 2016, 7:26am UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368/1 "2016-06-30T07:26:01Z")

</div>

Hi all,

if I create a snapshot with the following command  
curl -XPUT localhost:9200/\_snapshot/my\_backup -d '{  
"type": "fs",  
"settings": {  
"location": "/opt/elasticsearch/elasticsearch-repo/my\_backup"  
}  
}'

then the created snapshot has permission rwxr-xr-x and the owner is elasticsearch and group is elasticsearch. The elasticsearch service run as elasticsearch:elasticsearch.

The directory /opt/elasticsearch/elasticsearch-repo/ has the permission rwxrwx---.

How to create a snapshot so that group has write permission?

Many thanks.

---

<div class="post-metadata">

**Author:** ![Dilip\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dilip_kumar/32/15459_2.png) [@Dilip\_Kumar](https://discuss.elastic.co/u/Dilip_Kumar)\
**Post date:** [June 30, 2016, 7:39am UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368/2 "2016-06-30T07:39:24Z")

</div>

Hi Robert,  
U should give 777 permission to folder where u r taking snapshot and given that folder name in config file...

---

<div class="post-metadata">

**Author:** ![robert.volkmann](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@robert.volkmann](https://discuss.elastic.co/u/robert.volkmann)\
**Post date:** [June 30, 2016, 8:27am UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368/3 "2016-06-30T08:27:23Z")

</div>

Hi Dilip,

I give the folder 777 permission and nothing changed. The elasticsearch-repo folder is already in the config.

---

<div class="post-metadata">

**Author:** ![robert.volkmann](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@robert.volkmann](https://discuss.elastic.co/u/robert.volkmann)\
**Post date:** [June 30, 2016, 12:12pm UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368/4 "2016-06-30T12:12:58Z")

</div>

I found the desired solution. Every service is started by systemd with umask 0022. Hence I only have to change it for the elasticsearch service to 0002.

---

<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:** [July 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/how-to-create-a-snapshot-so-that-group-has-write-permission/54368/5 "2017-07-05T22:39:12Z")

</div>


