# Elasticsearch crashes when updated data path

**URL:** <https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024>\
**Category:** Elasticsearch\
**Created:** [November 19, 2015, 8:36am UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024 "2015-11-19T08:36:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjay\_Bhosale](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sanjay\_Bhosale](https://discuss.elastic.co/u/Sanjay_Bhosale)\
**Post date:** [November 19, 2015, 8:36am UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/1 "2015-11-19T08:36:08Z")

</div>

Hi,

Elasticsearch setup works fine with default configurations.  
But when updated its path.data setting from elasticsearch.yml file it crashes with below error

```
[2015-11-19 12:39:56,194][ERROR][bootstrap] Exception
java.lang.IllegalStateException: Unable to access 'path.data' (/home/hadoop/bigdata/data/elasticsearch)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:197)
        at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:170)
        at org.elasticsearch.bootstrap.Security.configure(Security.java:100)
        at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:181)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:159)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Caused by: java.nio.file.AccessDeniedException: /home/hadoop/bigdata/data
        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.checkAccess(UnixFileSystemProvider.java:308)
        at java.nio.file.Files.createDirectories(Files.java:702)
        at org.elasticsearch.bootstrap.Security.ensureDirectoryExists(Security.java:218)
        at org.elasticsearch.bootstrap.Security.addPath(Security.java:195)
        ... 6 more

```

I have copied elasticsearch directory from /var/lib location with preserved mode. But no success.  
Can anybody please help me to come out of this error

Thanks,  
Sanjay Bhosale

---

<div class="post-metadata">

**Author:** ![mainec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainec/32/5557_2.png) [@mainec](https://discuss.elastic.co/u/mainec)\
**Post date:** [November 19, 2015, 11:18am UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/2 "2015-11-19T11:18:46Z")

</div>

> [@Sanjay\_Bhosale](#):
>
> Caused by: java.nio.file.AccessDeniedException: /home/hadoop/bigdata/data

This sounds like an access permissions issue to me. You might want to check the user elasticsearch is running under is allowed to access the directory mentioned in the error message.

Hope this helps,  
Isabel

---

<div class="post-metadata">

**Author:** ![Sanjay\_Bhosale](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sanjay\_Bhosale](https://discuss.elastic.co/u/Sanjay_Bhosale)\
**Post date:** [November 19, 2015, 11:23am UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/3 "2015-11-19T11:23:39Z")

</div>

As i have already copied the same directory where it works with same privileges and access permission.  
It should be able access directory.

What can i do further to check for accessibilty?

Thanks,  
Sanjay Bhosale.

---

<div class="post-metadata">

**Author:** ![mainec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainec/32/5557_2.png) [@mainec](https://discuss.elastic.co/u/mainec)\
**Post date:** [November 19, 2015, 1:41pm UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/4 "2015-11-19T13:41:04Z")

</div>

Not sure what OS you are running, if it's some \*ix I'd double check permissions are really what you expect them to be (with something as simple as "ls").

---

<div class="post-metadata">

**Author:** ![Sanjay\_Bhosale](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sanjay\_Bhosale](https://discuss.elastic.co/u/Sanjay_Bhosale)\
**Post date:** [November 19, 2015, 1:51pm UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/5 "2015-11-19T13:51:03Z")

</div>

Yes i checked by ls -rla command and both looks same.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [November 19, 2015, 3:03pm UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/6 "2015-11-19T15:03:57Z")

</div>

What about /home/hadoop/bigdata, /home/hadoop, and /home? The ES user needs at least executable permissions on all those directories.

---

<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, 11:37pm UTC](https://discuss.elastic.co/t/elasticsearch-crashes-when-updated-data-path/35024/7 "2017-07-05T23:37:12Z")

</div>


