searchguard_node_key.key generated, but then cannot be found

Search Guard built from branch es1.6 running with ES 1.6.0-1 rpm.

The key file ‘searchguard_node_key.key’ is generated at the location specified in elasticsearch.yml, but a few lines later it says it can’t find it in the location ‘./searchguard_node_key.key’ which is not the location specified in the yml file. it is obviously picking up the setting when generating the file, but not later when trying to read it.

[ec2-user@ip-10-100-51-231 ~]$ sudo service elasticsearch start

Starting elasticsearch: [ OK ]

[ec2-user@ip-10-100-51-231 ~]$ more /esvolume/elasticsearch/logs/Terraform-Dev-vpc-def543ba-cluster-1.log

[2015-10-29 19:03:19,383][INFO ][node ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] version[1.6.0], pid[23311], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-10-29 19:03:19,384][INFO ][node ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] initializing …

[2015-10-29 19:03:19,511][INFO ][com.floragunn.searchguard.SearchGuardPlugin] Class enhancements for DLS/FLS successful

[2015-10-29 19:03:19,512][INFO ][plugins ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] loaded [searchguard], sites

[2015-10-29 19:03:21,619][INFO ][com.floragunn.searchguard.service.SearchGuardService] New key written to /esvolume/elasticsearch/sg/searchguard_node_key.key, make sure all nodes have this


[2015-10-29 19:03:21,843][INFO ][node ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] version[1.6.0], pid[23311], build[cdd3ac4/2015-06-09T13:36:34Z]

[2015-10-29 19:03:21,843][INFO ][node ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] initializing …

[2015-10-29 19:03:21,844][INFO ][plugins ] [Terraform-Dev-vpc-def543ba-cluster-1-tribe-] loaded [searchguard], sites

[2015-10-29 19:03:22,451][ERROR][com.floragunn.searchguard.service.SearchGuardService] Cannot generate or read secrety key ./searchguard_node_key.key (Permission denied)

My workaround was to start the service in the directory where the key is to be created so ‘./’ is correct.

/etc/init.d/elasticsearch start

Am I missing something?