I have read on multiple occasions that you cannot run elasticsearch as root. I understand the principle behind this and I agree. However, due to very specific installation constraints, we do not install our solution (a series of java modules + elasticsearch) ourselves, we create an installer (a bash script) and the customer runs it as root.
This last part (running as root) is new information to us and now we are sort of stuck and don't know how to run elasticsearch.
Is it a good idea to fork the elasticsearch project, modify the part that throws the exception, package it and use this modified version instead of the official elasticsearch? It sounds like a bad idea to do so but we cannot find a proper workaround so far.
You are correct that this is a bad idea. You should work with your customer(s) to identify or create a non-root user as whom you can run Elasticsearch.
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.