# Permission denied in logstash?

**URL:** <https://discuss.elastic.co/t/permission-denied-in-logstash/71320>\
**Category:** Logstash\
**Created:** [January 12, 2017, 6:14am UTC](https://discuss.elastic.co/t/permission-denied-in-logstash/71320 "2017-01-12T06:14:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [January 12, 2017, 6:14am UTC](https://discuss.elastic.co/t/permission-denied-in-logstash/71320/1 "2017-01-12T06:14:58Z")

</div>

HI,  
ES 2.4.0  
Logstash 5.1.1  
when i executed the following code :

input {  
elasticsearch {  
hosts =\> "[http://localhost:9200/](http://localhost:9200/)"  
index =\> "mediacontent-jan-2017"

}  
}  
output {  
file {  
path =\> "C:\Users\571952\Desktop\logstash-5.1.1\logstashdata"  
codec =\> json\_lines  
}  
}

It is showing error like this in command prompt:

[2017-01-12T10:55:24,283][INFO][logstash.pipeline] Starting pipeline {"id"=\>"mai  
n", "pipeline.workers"=\>2, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeli  
ne.max\_inflight"=\>250}  
[2017-01-12T10:55:24,283][INFO][logstash.pipeline] Pipeline main started  
[2017-01-12T10:55:24,486][INFO][logstash.agent] Successfully started Logstash  
API endpoint {:port=\>9600}  
[2017-01-12T10:55:24,720][INFO][logstash.outputs.file] Opening file {:path=\>"C:/User  
s/571952/Desktop/logstash-5.1.1/logstashdata"}  
An unexpected error occurred! :error =\> Permission denied - C:/Users/571952/Desktop/logst  
ash-5.1.1/logstashdata, :backtrace =\> ["org/jruby/RubyFile.java:370:in `initialize'", "or g/jruby/RubyIO.java:871:in`new'", "C:/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/  
jruby/1.9/gems/logstash-output-file-4.0.1/lib/logstash/outputs/file.rb:280:in `open'", "C :/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-file-4 .0.1/lib/logstash/outputs/file.rb:132:in`multi\_receive\_encoded'", "org/jruby/RubyHash.ja  
va:1342:in `each'", "C:/Users/571952/Desktop/logstash-5.1.1/vendor/bundle/jruby/1.9/gems/ logstash-output-file-4.0.1/lib/logstash/outputs/file.rb:131:in`multi\_receive\_encoded'",  
"org/jruby/ext/thread/Mutex.java:149:in `synchronize'", "C:/Users/571952/Desktop/logstash -5.1.1/vendor/bundle/jruby/1.9/gems/logstash-output-file-4.0.1/lib/logstash/outputs/file. rb:130:in`multi\_receive\_encoded'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core  
/lib/logstash/outputs/base.rb:90:in `multi_receive'", "C:/Users/571952/Desktop/logstash-5 .1.1/logstash-core/lib/logstash/output_delegator_strategies/shared.rb:12:in`multi\_receiv  
e'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/output\_delegator.  
rb:42:in `multi_receive'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logs tash/pipeline.rb:331:in`output\_batch'", "org/jruby/RubyHash.java:1342:in `each'", "C:/Us ers/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/pipeline.rb:330:in`output\_b  
atch'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/pipeline.rb:28  
8:in `worker_loop'", "C:/Users/571952/Desktop/logstash-5.1.1/logstash-core/lib/logstash/p ipeline.rb:258:in`start\_workers'"]

when i checked the permissions of logstashdata folder in properties tab everything is fine.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 12, 2017, 6:34am UTC](https://discuss.elastic.co/t/permission-denied-in-logstash/71320/2 "2017-01-12T06:34:44Z")

</div>

> [@Yaswanth](#):
>
> Permission denied - C:/Users/571952/Desktop/logstash-5.1.1/logstashdata

Can you create a file as that user in that directory?

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [January 12, 2017, 6:43am UTC](https://discuss.elastic.co/t/permission-denied-in-logstash/71320/3 "2017-01-12T06:43:57Z")

</div>

hey, you way to create a file in that logstash folder

---

<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:** [February 9, 2017, 6:44am UTC](https://discuss.elastic.co/t/permission-denied-in-logstash/71320/4 "2017-02-09T06:44:14Z")

</div>

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