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.