I am getting java.nio.file.AccessDeniedException: /usr/share/elasticsearch/config/certs/elastic-certificates.p12
when I try to start Elasticsearch. I have performed curl -X POST "localhost:9200/_xpack/license/start_trial?acknowledge=true" before and also initialized the built-in user's passwords. So what is the problem?
my elastic user is in the wheel user group (CentOS 7)
Did you change the permissions for the /usr/share/elasticsearch/config or /usr/share/elasticsearch after installation ?
Can you share with us the output of
ls -ld /usr/share/elasticsearch
ls -ld /usr/share/elasticsearch/config
ls -ld /usr/share/elasticsearch/config/certs
ls -la /usr/share/elasticsearch/config/certs
elasticsearch runs as elastic user in centos. You'd need to make elastic the owner of certs dir so that it can read the files from there, as now only root can read them
drwxr-xr-x 2 root root 4096 Mar 29 06:22 .
-rw------- 1 root root 3451 Mar 29 06:05 elastic-certificates.p12
-rw------- 1 root root 2527 Mar 29 06:05 elastic-stack-ca.p12
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.