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

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!

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