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

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.

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

Hi Dilip,

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

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.