# /var/run/elasticsaerch has incorrect owner on reboot

**URL:** <https://discuss.elastic.co/t/var-run-elasticsaerch-has-incorrect-owner-on-reboot/140197>\
**Category:** Elasticsearch\
**Created:** [July 16, 2018, 4:53pm UTC](https://discuss.elastic.co/t/var-run-elasticsaerch-has-incorrect-owner-on-reboot/140197 "2018-07-16T16:53:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeme1988](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mikeme1988](https://discuss.elastic.co/u/mikeme1988)\
**Post date:** [July 16, 2018, 4:53pm UTC](https://discuss.elastic.co/t/var-run-elasticsaerch-has-incorrect-owner-on-reboot/140197/1 "2018-07-16T16:53:30Z")

</div>

Hey everyone,

We run elasticsearch as a different user so we have the /etc/systemd/system/elasticsearch.service.d/override.conf in place with the user we run the service as.

The problem is every time we reboot our nodes the /var/run/elasticsearch directory is created and owned by elasticsearch:elasticsearch causing the service to not start because its not owned by the user we are running the service as. Does the override file not catch this directory or did I miss a step somewhere about config for this directory?

Any help would be awesome!

---

<div class="post-metadata">

**Author:** ![mikeme1988](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mikeme1988](https://discuss.elastic.co/u/mikeme1988)\
**Post date:** [July 16, 2018, 5:39pm UTC](https://discuss.elastic.co/t/var-run-elasticsaerch-has-incorrect-owner-on-reboot/140197/2 "2018-07-16T17:39:20Z")

</div>

I found the answer after looking for different ways to own the folder at startup. Turns out there is /usr/lib/tmpfiles.d/elasticsearch.conf that needs to be changed if you run as a different user.

But then the question becomes why is the override file not covering this?

---

<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:** [August 13, 2018, 5:39pm UTC](https://discuss.elastic.co/t/var-run-elasticsaerch-has-incorrect-owner-on-reboot/140197/3 "2018-08-13T17:39:22Z")

</div>

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