AccessControlException when accessing local file from plugin


(Andrew Wooster) #1

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?


#2

See https://github.com/elastic/elasticsearch/pull/14108


(system) #3