# Shared fs backup repository credentials

**URL:** <https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031>\
**Category:** Elasticsearch\
**Created:** [April 13, 2018, 11:06pm UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031 "2018-04-13T23:06:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alca](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alca](https://discuss.elastic.co/u/alca)\
**Post date:** [April 13, 2018, 11:06pm UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031/1 "2018-04-13T23:06:35Z")

</div>

Hi there,

I have read through the documentation for [snapshot and restore](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/modules-snapshots.html), but have encountered the following error when I have my path.repo pointing to "\\SERVER\share" or even to a mapped drive ("U:\backups") in my elasticsearch.yml. This share requires credentials to authenticate. **How do I pass these credentials along in order to be able to access the mapped drive?**

Elasticsearch version: 6.2.2  
Desired repository type: fs  
path.repo=["U:\backups","\\SERVER\share"]

> [2018-04-13T15:34:04,061][ERROR][o.e.b.Bootstrap] Exception  
> java.lang.IllegalStateException: Unable to access 'path.repo' (U:\ElasticsearchBackupService)  
> at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:70) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:323) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:262) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Security.configure(Security.java:123) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:208) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]  
> at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]  
> Caused by: java.nio.file.FileSystemException: U:\ElasticsearchBackupService: Unable to determine if root directory exists  
> at java.nio.file.Files.createDirectories(Files.java:756) ~[?:1.8.0\_161]  
> at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:421) ~[elasticsearch-6.2.2.jar:6.2.2]  
> at org.elasticsearch.bootstrap.FilePermissionUtils.addDirectoryPath(FilePermissionUtils.java:68) ~[elasticsearch-6.2.2.jar:6.2.2]  
> ... 12 more

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2018, 8:55am UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031/2 "2018-04-14T08:55:07Z")

</div>

You normally do that on the OS Level when you mount your drive.  
Elasticsearch should just be able to read and write from/to the dir.

---

<div class="post-metadata">

**Author:** ![alca](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alca](https://discuss.elastic.co/u/alca)\
**Post date:** [April 16, 2018, 3:00pm UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031/3 "2018-04-16T15:00:56Z")

</div>

Elasticsearch has not been able to write to the mounted drive, even after just authenticating. Is it perhaps because I am using different credentials for the drive? (other than the signed-in user)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 16, 2018, 3:54pm UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031/4 "2018-04-16T15:54:09Z")

</div>

> Is it perhaps because I am using different credentials for the drive?

Probably. The user who is running elasticsearch must have write access to the shared drive.

---

<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:** [May 14, 2018, 3:54pm UTC](https://discuss.elastic.co/t/shared-fs-backup-repository-credentials/128031/5 "2018-05-14T15:54:29Z")

</div>

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