Upgrading to Elasticsearch 6.5.4 got Java AccessControlException: access denied for Elasticsearch.yml

We are using Elasticsearch 6.1.2 now and are trying to upgrade to latest version Elasticsearch 6.5.4. When I start the new version of Elasticsearch on the same machine that we ran 6.1.2 before, I got
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/home/jqiu/search/elasticsearch-6.5.4/config/elasticsearch.yml" "read")

Does anyone know what extra steps I need in order to upgrade to 6.5.4? Do I need to add some java.policy file?

Thanks,

Jay

What is the permissions on the file?

The problem is related to ElasticSearch 6.2 change: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/breaking-changes-6.2.html

All permission bootstrap check

Elasticsearch installs a security manager during bootstrap to mitigate the scope of exploits in the JDK, in third-party dependencies, and in Elasticsearch itself as well as to sandbox untrusted plugins. A custom security policy can be applied and one permission that can be added to this policy is java.security.AllPermission .

But even I created the following file as java.policy and add this file in java -Djava.security.policy=file:/home/jqiu/java.policy, I still got the same access denied issue.

grant codeBase "file:/home/jqiu/search/*" {
permission java.security.AllPermission;
};

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