Found a solution. user should be elasticsearch. on executing the chown elasticsearch:elasticsearch folder as root user on the directory and restarting the elasticsearch and kibana resolved the issue. Thanks.
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.