# Logstash cannot upload files, "failed to open Permission Denied"

**URL:** <https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584>\
**Category:** Logstash\
**Created:** [February 27, 2017, 7:30am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584 "2017-02-27T07:30:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArieTwigt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arietwigt/32/15872_2.png) [@ArieTwigt](https://discuss.elastic.co/u/ArieTwigt)\
**Post date:** [February 27, 2017, 7:30am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/1 "2017-02-27T07:30:14Z")

</div>

I am facing an issue with uploading XML-files to an index in the cloud using Logstash. I have a directory with around 10.000 files and configured a Logstash in which all the contents of that directory are indicated. When executing the **_.conf_** - file in the Terminal, it uploads some documents (around 200) successfully to the index. However, after that I get a lot of **_permission denied_** messages and the process stops.

**This is the .conf file:**

* * *

input {  
file {  
path =\> "/Users/arietwigt/Documents/Archief\_test/\*"  
start\_position =\> "beginning"  
sincedb\_path =\> "/Users/arietwigt/Documents/Archief\_test/sincedb"  
codec =\> multiline {  
pattern =\> ""  
negate =\> true  
what =\> "previous"  
max\_lines =\> 15000  
}  
max\_open\_files =\> 2500000  
}  
}

filter {  
_filter stuff_  
}

output {  
elasticsearch {  
hosts =\> "[https://xxx.eu-west-1.aws.found.io:9243](https://xxx.eu-west-1.aws.found.io:9243)"  
user =\> "elastic"  
password =\> "xxxxx"  
index =\> "my\_index"  
document\_type =\> "my\_type"  
}  
stdout {  
codec =\> rubydebug  
}

}

* * *

**And this is the message I get in the Terminal:**

* * *

[2017-02-27T08:20:22,235][WARN][logstash.inputs.file] failed to open /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_60.xml: Permission denied - /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_60.xml  
[2017-02-27T08:20:22,238][WARN][logstash.inputs.file] failed to open /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_61.xml: Permission denied - /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_61.xml  
[2017-02-27T08:20:22,239][WARN][logstash.inputs.file] failed to open /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_62.xml: Permission denied - /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_62.xml

... and so fort

* * *

Has anyone faced this problem before or can somebody notice if I am missing something 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:** [February 27, 2017, 8:23am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/2 "2017-02-27T08:23:47Z")

</div>

What does `ls -l /Users/arietwigt/Documents/Archief_test/ECLI_NL_RVS_2016_62.xml` return?

---

<div class="post-metadata">

**Author:** ![ArieTwigt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arietwigt/32/15872_2.png) [@ArieTwigt](https://discuss.elastic.co/u/ArieTwigt)\
**Post date:** [February 27, 2017, 8:38am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/3 "2017-02-27T08:38:50Z")

</div>

Hey Magnus, thanks for your quick response 🙂

_ls -l /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_62.xml_

**returns:**

_-rwxrwxrwx@ 1 logstash staff 15155 5 jan 14:42 /Users/arietwigt/Documents/Archief\_test/ECLI\_NL\_RVS\_2016\_62.xml_

---

<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:** [February 27, 2017, 8:48am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/4 "2017-02-27T08:48:43Z")

</div>

That file has extended attributes (as evident by the @ sign). Perhaps something to look into? Otherwise I don't know what's up.

---

<div class="post-metadata">

**Author:** ![ArieTwigt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arietwigt/32/15872_2.png) [@ArieTwigt](https://discuss.elastic.co/u/ArieTwigt)\
**Post date:** [February 27, 2017, 11:22am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/5 "2017-02-27T11:22:47Z")

</div>

Okay, I will look into the attributes of the files. Thanks for your help, I will let you know.

---

<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:** [March 27, 2017, 11:22am UTC](https://discuss.elastic.co/t/logstash-cannot-upload-files-failed-to-open-permission-denied/76584/6 "2017-03-27T11:22:47Z")

</div>

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