# No config or log files and folders after reinstallation

**URL:** <https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 10:35am UTC](https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866 "2017-11-23T10:35:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErikvdVen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erikvdven/32/24602_2.png) [@ErikvdVen](https://discuss.elastic.co/u/ErikvdVen)\
**Post date:** [November 23, 2017, 10:35am UTC](https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866/1 "2017-11-23T10:35:44Z")

</div>

I tried installing elasticsearch on Ubuntu Desktop 16.04.2 lts. At first, all went fine, installation including creation of configuration and log folders (and symlinks). Except for the part I forgot about installing Java, so my elasticsearch was unable to start. After installing Java it still wasn't able to start, so I removed elasticsearch:

```
sudo apt-get remove elasticsearch

```

After installing it again:

```
sudo apt-get install elasticsearch

```

It doesn't create any configuration and log folders, or files, anymore. I cannot reach /etc/elasticsearch, because it now contains "elasticsearch" as user, while it contained "root" after first installation. Also, the folder is empty.

So my issue is, after first installation (before Java was installed) it created the configuration files and folders under /etc, including the symlinks in /usr/share/elasticsearch. But after the second installation it doesn't.

I'm not really sure what the configuration file should contain, of elasticsearch 6, so I don't want to create it manually.

**EDIT:**  
After executing below commands, I was able to run elasticsearch successfully, but it still doesn't contain the configuration files.....

I removed elasticsearch completely with below commands.

```
apt remove --purge elasticsearch
apt autoremove
apt-get install elasticsearch

```

Then while installing elasticsearch again, I faced a 'stateoverride' problem, to solve it, open stateoverride file and remove all lines which include "elasticsearch":

```
vi /var/lib/dpkg/stateoverride

```

Now I was able to successfully run elasticsearch:

```
systemctl start elasticsearch

```

But it still doesn't create any configuration files or folders. Hopefully anyone over here can help me out.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [December 1, 2017, 12:42pm UTC](https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866/2 "2017-12-01T12:42:33Z")

</div>

> [@ErikvdVen](#):
>
> At first, all went fine, installation including creation of configuration and log folders (and symlinks).

What symlinks are you referring to? We do not create any symlinks as part of our package installation. Maybe you're referring to the systemd symlinks for the service?

---

<div class="post-metadata">

**Author:** ![ErikvdVen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erikvdven/32/24602_2.png) [@ErikvdVen](https://discuss.elastic.co/u/ErikvdVen)\
**Post date:** [December 5, 2017, 3:30pm UTC](https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866/3 "2017-12-05T15:30:55Z")

</div>

With symlinks (on new ubuntu server, but it complains about a "java runtime not found" issue again on startup)  
 ![Screenshot from 2017-12-05 16-24-55](https://us1.discourse-cdn.com/elastic/original/3X/3/1/311db58814511ce811cdfadf510f5365991c9e5d.png)!

![Screenshot from 2017-12-05 16-25-14](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83fa408b755b002625a9775c75da1c7bd4b6eaca.png)!

Without symlinks (on my current ubuntu server, which actually works but symlinks seem to be missing)  
 ![Screenshot from 2017-12-05 16-28-56](https://us1.discourse-cdn.com/elastic/original/3X/4/f/4f8abb90180c97f620e52ee9790cc702a2339de0.png)!

![Screenshot from 2017-12-05 16-29-57](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad3bd76ee4774c40fce4ab63f4d7d7bb33a4baac.png)!

As you might see in my last screenshot, I'm not able to access /etc/elasticsearch either, without being root user.

---

<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 2, 2018, 3:31pm UTC](https://discuss.elastic.co/t/no-config-or-log-files-and-folders-after-reinstallation/108866/4 "2018-01-02T15:31:02Z")

</div>

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