# File and directory permissions for /var/log/elasticsearch that I set revert back whenever I reboot

**URL:** <https://discuss.elastic.co/t/file-and-directory-permissions-for-var-log-elasticsearch-that-i-set-revert-back-whenever-i-reboot/211713>\
**Category:** Elasticsearch\
**Created:** [December 12, 2019, 7:26pm UTC](https://discuss.elastic.co/t/file-and-directory-permissions-for-var-log-elasticsearch-that-i-set-revert-back-whenever-i-reboot/211713 "2019-12-12T19:26:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theVidVid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevidvid/32/59146_2.png) [@theVidVid](https://discuss.elastic.co/u/theVidVid)\
**Post date:** [December 12, 2019, 7:26pm UTC](https://discuss.elastic.co/t/file-and-directory-permissions-for-var-log-elasticsearch-that-i-set-revert-back-whenever-i-reboot/211713/1 "2019-12-12T19:26:21Z")

</div>

Hello,

I have a hobby flask web app running the Elasticsearch service.

I am running Ubuntu 19.10 and followed the official installation instructions.

I have had several issues where the service won't start after restarting my computer.  
I've made it a habit every time I reboot to check whether the service is running by typing the following in my terminal:  
`curl -X GET "localhost:9200/?pretty"`

Typically it is a file/directory permission issues in the _ **/var/log/elasticsearch** _ directory **OR**  
the **elasticsearch/** directory being deleted.

So after through reading various posts, I know how to manually fix each of those issues:  
If the directory is deleted, I create the directory and also create a gc.log file and set the permission of the directory containing it to 755.

If it's a permission issue, I just change that same directory's permissions to 755.

In both cases I can get it to work again, but I want to know how to prevent these issues from happening and not have to manually do it each time I reboot.

Is it my OS reverting these changes or is it some Elasticsearch setting that i'm not aware of that is responsible?

Thanks in advance!

---

<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:** [January 9, 2020, 7:26pm UTC](https://discuss.elastic.co/t/file-and-directory-permissions-for-var-log-elasticsearch-that-i-set-revert-back-whenever-i-reboot/211713/2 "2020-01-09T19:26:22Z")

</div>

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