# AccessControlException when accessing local file from plugin

**URL:** <https://discuss.elastic.co/t/accesscontrolexception-when-accessing-local-file-from-plugin/33658>\
**Category:** Elasticsearch\
**Created:** [November 3, 2015, 5:19pm UTC](https://discuss.elastic.co/t/accesscontrolexception-when-accessing-local-file-from-plugin/33658 "2015-11-03T17:19:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewwwooster](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@andrewwwooster](https://discuss.elastic.co/u/andrewwwooster)\
**Post date:** [November 3, 2015, 5:19pm UTC](https://discuss.elastic.co/t/accesscontrolexception-when-accessing-local-file-from-plugin/33658/1 "2015-11-03T17:19:13Z")

</div>

I have an indexing plug-in that requires to access local files. The plug-in worked fine under elasticsearch 1.7, but with 2.0 I get the following error:

IndexCreationException[failed to create index]; nested: ExceptionInInitializerError; nested: AccessControlException[access denied ("java.io.FilePermission" "\magellan\myfile.cfg" "read")];

It looks like I am running afoul of the new elasticsearch 2.0 SecurityManager security.policy. As a temporary measure I used the -Des.security.manager.enabled=false start-up option to disable.

How should properly enable access to local files from an elasticsearch 2.0 plugin?

---

<div class="post-metadata">

**Author:** ![rmuir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmuir/32/44949_2.png) [@rmuir](https://discuss.elastic.co/u/rmuir)\
**Post date:** [November 3, 2015, 5:36pm UTC](https://discuss.elastic.co/t/accesscontrolexception-when-accessing-local-file-from-plugin/33658/2 "2015-11-03T17:36:14Z")

</div>

See [https://github.com/elastic/elasticsearch/pull/14108](https://github.com/elastic/elasticsearch/pull/14108)

---

<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:40pm UTC](https://discuss.elastic.co/t/accesscontrolexception-when-accessing-local-file-from-plugin/33658/3 "2017-07-05T23:40:52Z")

</div>


