# Why does X-Pack require root permissions for installation?

**URL:** <https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301>\
**Category:** Elasticsearch\
**Created:** [October 28, 2016, 2:16pm UTC](https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301 "2016-10-28T14:16:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CoaxVex](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CoaxVex](https://discuss.elastic.co/u/CoaxVex)\
**Post date:** [October 28, 2016, 2:16pm UTC](https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301/1 "2016-10-28T14:16:59Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 28, 2016, 2:54pm UTC](https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301/2 "2016-10-28T14:54:43Z")

</div>

Hey,

there is no need to be root. You can install Elasticsearch as any user. Just make sure that the user you are installing x-pack is, is the same as the one you installed elasticsearch with or that this user is able to write into the Elasticsearch directory.

--Alex

---

<div class="post-metadata">

**Author:** ![CoaxVex](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CoaxVex](https://discuss.elastic.co/u/CoaxVex)\
**Post date:** [October 28, 2016, 3:09pm UTC](https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301/3 "2016-10-28T15:09:12Z")

</div>

I just started from scratch and now it works. I must have done something wrong with the initial unpack/move. Feeling pretty stupid. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:40pm UTC](https://discuss.elastic.co/t/why-does-x-pack-require-root-permissions-for-installation/64301/4 "2017-07-06T13:40:12Z")

</div>


