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 ("" "\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 start-up option to disable.

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



(system) #3