I'm currently setting up an elasticsearch cluster for a client, who prefers to not have me run anything as root.
This works quite ok with the tarball release, but I get stuck at installing x-pack.
It looks like the x-pack installation just uses root privileges to set ownership on some of its directories.
Is this absolutely necessary? Could I just copy over an installation directory from somewhere else, that already has x-pack installed?
[...]
Continue with installation? [y/N]y
Exception in thread "main" java.nio.file.FileSystemException: /opt/elasticsearch-5.0.0/config/x-pack: Operation not permitted
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileAttributeViews$Posix.setOwners(UnixFileAttributeViews.java:252)
at sun.nio.fs.UnixFileAttributeViews$Posix.setGroup(UnixFileAttributeViews.java:291)
at org.elasticsearch.plugins.InstallPluginCommand.setOwnerGroup(InstallPluginCommand.java:582)
at org.elasticsearch.plugins.InstallPluginCommand.installConfig(InstallPluginCommand.java:555)
at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:490)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:207)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:190)
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:96)
at org.elasticsearch.cli.Command.main(Command.java:62)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:42)