Elasticsearch permissions


It is not too clear for me... should elasticsearch be starting with root or with a user that has sudo rights?
Should the user elasticsearch be used ?

thank you


You cannot run Elasticsearch as root - we have checks in place to prevent that.

If you installed from an OS package (rpm, deb, etc) then you should run as the elasticsearch user.
If you performed an archive install (zip, tgz) then you will need to create an appropriate user to run Elasticsearch.

1 Like

Thank you Tim ... that clarifies it
Those checks do not seem to work as I have been able to start elasticsearch continuously without a problem.
Now I need to do some readjustments :smile:

I was actually starting it with sudo -H -u elasticsearch but was getting errors on folders, with permisison denied. folders owned with root root.
Should these folder permissions be elasticsearch root ?
/usr/share/elasticsearch/logs/elasticsearch_index_indexing_slowlog.log (Permission denied)
is an example.

thanks again

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