# 12345

**URL:** <https://discuss.elastic.co/t/topic/27897>\
**Category:** Logstash\
**Created:** [August 23, 2015, 9:59am UTC](https://discuss.elastic.co/t/topic/27897 "2015-08-23T09:59:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamasdj123](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jamasdj123](https://discuss.elastic.co/u/jamasdj123)\
**Post date:** [August 23, 2015, 9:59am UTC](https://discuss.elastic.co/t/topic/27897/1 "2015-08-23T09:59:26Z")

</div>

12345

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 23, 2015, 6:06pm UTC](https://discuss.elastic.co/t/topic/27897/2 "2015-08-23T18:06:45Z")

</div>

> I get the following error message:  
> Error: Failed to open /opt/logs/logstash/logstash.log for writing: Permission denied - /opt/logs/logstash/logstash.log

What user does Logstash run as and what's the output of the following command?

```
ls -l /opt/logs/logstash/logstash.log /opt/logs/logstash

```

> Is this the correct forum or should I file a bug-report?

This is a good place for questions. Let's wait with the bug report until we know there actually is a bug. Bug reports are read by fewer people so you have a better chance of getting help here.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 25, 2015, 6:37pm UTC](https://discuss.elastic.co/t/topic/27897/5 "2015-08-25T18:37:27Z")

</div>

Again, what user owns and what are the permissions of /opt/logs/logstash and /opt/logs/logstash/logstash.log?

---

<div class="post-metadata">

**Author:** ![alex.ivanov](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@alex.ivanov](https://discuss.elastic.co/u/alex.ivanov)\
**Post date:** [February 3, 2016, 10:47pm UTC](https://discuss.elastic.co/t/topic/27897/8 "2016-02-03T22:47:30Z")

</div>

Same problem here.

ubuntu@ip-10-0-0-113:/var/log/logstash$ cat logstash.stdout  
Error: Failed to open /var/log/logstash/logstash.log for writing: No such file or directory - /var/log/logstash/logstash.log

This is often a permissions issue, or the wrong  
path was specified?  
You may be interested in the '--configtest' flag which you can  
use to validate logstash's configuration before you choose  
to restart a running system.

ubuntu@ip-10-0-0-113:/var/log/logstash$ ls -l /var/log/logstash/logstash.log /var/log/logstash  
-rw-r--rw- 1 logstash logstash 0 Feb 3 06:59 /var/log/logstash/logstash.log

/var/log/logstash:  
total 28  
-rw-r--r-- 1 root root 0 Feb 3 22:32 logstash.err  
-rw-r--rw- 1 logstash logstash 0 Feb 3 06:59 logstash.log  
-rw-r--r-- 1 root root 346 Feb 3 22:32 logstash.stdout

ubuntu@ip-10-0-0-113:/var/log/logstash$ sudo service logstash configtest  
Configuration OK

ubuntu@ip-10-0-0-113:/opt/logstash$ cat Gemfile  
source "[https://rubygems.org](https://rubygems.org)"  
gem "logstash-core", "2.1.1"

---

<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, 5:13am UTC](https://discuss.elastic.co/t/topic/27897/9 "2017-07-06T05:13:07Z")

</div>


