# Access denied error during snapshot creation

**URL:** <https://discuss.elastic.co/t/access-denied-error-during-snapshot-creation/137771>\
**Category:** Elasticsearch\
**Created:** [June 28, 2018, 10:18am UTC](https://discuss.elastic.co/t/access-denied-error-during-snapshot-creation/137771 "2018-06-28T10:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunachala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunachala/32/126762_2.png) [@arunachala](https://discuss.elastic.co/u/arunachala)\
**Post date:** [June 28, 2018, 10:18am UTC](https://discuss.elastic.co/t/access-denied-error-during-snapshot-creation/137771/1 "2018-06-28T10:18:16Z")

</div>

Following is our ES setup:  
version : 2.4.1  
Nodes: 2  
Shared directory : /data/backups on master (also a data) node and mounted using sshfs (fuse) on other nodes.

About, sshfs mount,

- Below is the fstab entry on non-master data node:  
\<sshfs#user@node1-ip:/data/backups /data/backups fuse rw,gid=125,uid=117,umask=000,default\_permissions,IdentityFile="/home/user/.ssh/id\_rsa",allow\_other 0 0/\>
- Note: gid:125 and uid:117 correspond to group 'elasticsearch' and user 'elasticsearch' respectively on the non-master data node.

On the mounted directory on non-master data nodes, I am able to create files/directories under /data/backups as user 'elasticsearch'.

But, still when we start a snapshot, we get the below error on the non-master data node.  
\<  
[2018-06-27 15:13:30,495][WARN][snapshots] [Brainchild] [[company-1-1-network-element-health-2018.06.26][0]] [company-repo:radware-lb-26jun] failed to create snapshot  
[company-1-1-network-element-health-2018.06.26][[company-1-1-network-element-health-2018.06.26][0]] IndexShardSnapshotFailedException[Failed to snapshot]; nested: ElasticsearchException[failed to create blob container]; nested: AccessDeniedException[/data/backups/indices/company-1-1-network-element-health-2018.06.26/0];  
at org.elasticsearch.snapshots.SnapshotShardsService.snapshot(SnapshotShardsService.java:355)  
at org.elasticsearch.snapshots.SnapshotShardsService.access$200(SnapshotShardsService.java:76)  
at org.elasticsearch.snapshots.SnapshotShardsService$1.doRun(SnapshotShardsService.java:296)  
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: ElasticsearchException[failed to create blob container]; nested: AccessDeniedException[/data/backups/indices/company-1-1-network-element-health-2018.06.26/0];  
at org.elasticsearch.common.blobstore.fs.FsBlobStore.blobContainer(FsBlobStore.java:70)  
at org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository$Context.(BlobStoreIndexShardRepository.java:310)  
at org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository$Context.(BlobStoreIndexShardRepository.java:303)  
at org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository$SnapshotContext.(BlobStoreIndexShardRepository.java:513)  
at org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardRepository.snapshot(BlobStoreIndexShardRepository.java:187)  
at org.elasticsearch.snapshots.SnapshotShardsService.snapshot(SnapshotShardsService.java:340)  
... 6 more  
Caused by: java.nio.file.AccessDeniedException: /data/backups/indices/company-1-1-network-element-health-2018.06.26/0  
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)  
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)  
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)  
at java.nio.file.Files.createDirectory(Files.java:674)  
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)  
at java.nio.file.Files.createDirectories(Files.java:767)  
at org.elasticsearch.common.blobstore.fs.FsBlobStore.buildAndCreate(FsBlobStore.java:86)  
at org.elasticsearch.common.blobstore.fs.FsBlobStore.blobContainer(FsBlobStore.java:68)  
... 11 more  
/\>

Output of ls command for the directory company-1-1-network-element-health-2018.06.26 within /data/backups.

\<  
indices/company-1-1-network-element-health-2018.06.26/:  
total 12  
drwxrwxrwx 1 elasticsearch elasticsearch 4096 Jun 27 15:14 1  
-rwxrwxrwx 1 elasticsearch elasticsearch 4160 Jun 27 15:14 meta-radware-lb-26jun.dat

indices/company-1-1-network-element-health-2018.06.26/1:  
total 153388  
-rwxrwxrwx 1 elasticsearch elasticsearch 10815295 Jun 27 15:14 \_\_0  
-rwxrwxrwx 1 elasticsearch elasticsearch 2607854 Jun 27 15:14 \_\_1  
-rwxrwxrwx 1 elasticsearch elasticsearch 375 Jun 27 15:14 \_\_10  
-rwxrwxrwx 1 elasticsearch elasticsearch 8069937 Jun 27 15:14 \_\_11  
-rwxrwxrwx 1 elasticsearch elasticsearch 413 Jun 27 15:14 \_\_12  
: : :  
-rwxrwxrwx 1 elasticsearch elasticsearch 937550 Jun 27 15:14 \_\_s  
-rwxrwxrwx 1 elasticsearch elasticsearch 2813 Jun 27 15:14 snap-radware-lb-26jun.dat  
-rwxrwxrwx 1 elasticsearch elasticsearch 49489 Jun 27 15:14 \_\_t  
-rwxrwxrwx 1 elasticsearch elasticsearch 49489 Jun 27 15:14 \_\_u  
-rwxrwxrwx 1 elasticsearch elasticsearch 26853 Jun 27 15:14 \_\_v  
-rwxrwxrwx 1 elasticsearch elasticsearch 321 Jun 27 15:14 \_\_w  
-rwxrwxrwx 1 elasticsearch elasticsearch 3219485 Jun 27 15:14 \_\_x  
-rwxrwxrwx 1 elasticsearch elasticsearch 1251 Jun 27 15:14 \_\_y  
-rwxrwxrwx 1 elasticsearch elasticsearch 8421693 Jun 27 15:14 \_\_z  
/\>

What am I missing here?  
-Arun

---

<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 26, 2018, 10:18am UTC](https://discuss.elastic.co/t/access-denied-error-during-snapshot-creation/137771/2 "2018-07-26T10:18:26Z")

</div>

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