# Permission error when performing logstash -f

**URL:** <https://discuss.elastic.co/t/permission-error-when-performing-logstash-f/226976>\
**Category:** Logstash\
**Created:** [April 7, 2020, 6:15pm UTC](https://discuss.elastic.co/t/permission-error-when-performing-logstash-f/226976 "2020-04-07T18:15:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Al1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/al1/32/65856_2.png) [@Al1](https://discuss.elastic.co/u/Al1)\
**Post date:** [April 7, 2020, 6:15pm UTC](https://discuss.elastic.co/t/permission-error-when-performing-logstash-f/226976/1 "2020-04-07T18:15:44Z")

</div>

Hi - I am very new to logstash and I am running into an issue when trying to perform a logstash - f on my .config file.

This is my .config file:

input {  
file {  
path =\> "/Users/alpitshah/Data/cars.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}  
filter {  
csv {

```
    separator => ","
            
    columns => ["maker","model","mileage","manufacture-year","engine_displacement","engine_power","body_type", "color_slug","stk_year","transmission","door_count","seat_count","fuel_type","date_created","date_last_seen", "price_eur"]
  }

 mutate {convert => ["mileage", "integer"]}
 mutate {convert => ["price_eur", "float"]}
 mutate {convert => ["door_count", "integer"]}
 mutate {convert => ["engine_power", "integer"]}
 mutate {convert => ["seat_count", "integer"]}

```

}  
output {  
elasticsearch {  
hosts =\> "localhost"  
index =\> "cars"  
document\_type =\> "sold\_cars"  
}  
stdout {}  
}

When I run the code: bin/logstash -f /Users/alpitshah/Data/logstash\_cars.config

I get the following error:

Plugin: \<LogStash::Inputs::File start\_position=\>"beginning", path=\>["/Users/alpitshah/Data/cars.csv"], id=\>"ba6990299d85aa8232a772dd81377d0289004654ce252354205802a68b7bde83", sincedb\_path=\>"/dev/null", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_f0d1be3c-8bd2-4a80-a946-82deef5463a4", enable\_metric=\>true, charset=\>"UTF-8"\>, stat\_interval=\>1.0, discover\_interval=\>15, sincedb\_write\_interval=\>15.0, delimiter=\>"\n", close\_older=\>3600.0, mode=\>"tail", file\_completed\_action=\>"delete", sincedb\_clean\_after=\>1209600.0, file\_chunk\_size=\>32768, file\_chunk\_count=\>140737488355327, file\_sort\_by=\>"last\_modified", file\_sort\_direction=\>"asc", exit\_after\_read=\>false\>

Error: Permission denied - Permission denied

Exception: Errno::EACCES

Stack: org/jruby/RubyFile.java:1269:in `utime'

uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1133:in `block in touch'

org/jruby/RubyArray.java:1814:in `each'

uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/fileutils.rb:1130:in `touch'

/Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/filewatch/sincedb\_collection.rb:22:in `initialize'

/Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/filewatch/observing\_base.rb:62:in `build\_watch\_and\_dependencies'

/Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/filewatch/observing\_base.rb:56:in `initialize'

/Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/logstash/inputs/file.rb:341:in `start\_processing'

/Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/logstash/inputs/file.rb:346:in `run'

/Users/alpitshah/logstash-7.6.2/logstash-core/lib/logstash/java\_pipeline.rb:328:in `inputworker'

/Users/alpitshah/logstash-7.6.2/logstash-core/lib/logstash/java\_pipeline.rb:320:in `block in start\_input'

[2020-04-07T14:04:21,236][INFO][filewatch.observingtail][main] START, creating Discoverer, Watch with file and sincedb collections

[2020-04-07T14:04:21,239][ERROR][logstash.javapipeline][main] A plugin had an unrecoverable error. Will restart this plugin.

Pipeline\_id:main

I am not sure how to tackle this problem. I followed a Youtube tutorial and not sure what I am missing.

Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 7, 2020, 7:50pm UTC](https://discuss.elastic.co/t/permission-error-when-performing-logstash-f/226976/2 "2020-04-07T19:50:40Z")

</div>

> [@Al1](#):
>
> /Users/alpitshah/logstash-7.6.2/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.1.16/lib/filewatch/sincedb\_collection.rb:22:in `initialize'

[That code](https://github.com/logstash-plugins/logstash-input-file/blob/a0384c08f89d661c2420fb35a737b438030a1bcc/lib/filewatch/sincedb_collection.rb#L22) is trying to touch the sincedb. It appears you do not have write access to /dev/null. Check the permissions and ownership of it.

---

<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:** [May 5, 2020, 7:50pm UTC](https://discuss.elastic.co/t/permission-error-when-performing-logstash-f/226976/3 "2020-05-05T19:50:48Z")

</div>

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