# Problems reading file by logstash input plugin (permissions)

**URL:** <https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593>\
**Category:** Logstash\
**Created:** [July 30, 2025, 11:38am UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593 "2025-07-30T11:38:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DetlefG](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@DetlefG](https://discuss.elastic.co/u/DetlefG)\
**Post date:** [July 30, 2025, 11:38am UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593/1 "2025-07-30T11:38:27Z")

</div>

Which permissions has to be set for a file read by input plugin of logstash ?

Following situation:

Logstash is running as service with _user/group logstash/logstash_.  
Input plugin of logstash should read the file _/home/myuser/subdir/log/env/error.log_.

File _error.log_ has following permissions and ownership:

`-rw-rwxr--+ 1 myuser mygroup 2096306521 Jul 30 08:25 /home/myuser/subdir/log/env/error_log`

The Directories have following permissions and ownership:

`drwxr-xr-x. 24 root root 4096 Jan 26 2024 /home`  
`drwxrwx---+ 14 myuser mygroup 4096 Jul 25 13:44 /home/myuser/`  
`drwxrwxr-x+ 20 myuser mygroup 4096 Jan 16 2025 /home/myuser/subdir/`  
`drwxrwxr-x+ 7 myuser mygroup 4096 Jul 22 05:37 /home/myuser/subdir/log/`  
`drwxrwxr-x+ 2 myuser mygroup4096 Jul 28 15:33 /home/myuser/subdir/log/env`

The user _logstash_ is member of group _logstash_ and _mygroup_.

Why is it not possible for the input plugin to read the log file ? What’s wrong in the configuration ?

Version of Logstash: 7.17.29

Thnx for any help !

---

<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:** [July 30, 2025, 1:25pm UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593/2 "2025-07-30T13:25:57Z")

</div>

I would suggest testing "chmod o+x /home/myuser/". It will need execute permission on the directory to open the subdir entry within it.

And yes, I realize that mygroup has full access to the directory. I still suggest that you try it and see whether it changes anything.

---

<div class="post-metadata">

**Author:** ![DetlefG](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@DetlefG](https://discuss.elastic.co/u/DetlefG)\
**Post date:** [July 31, 2025, 8:05am UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593/3 "2025-07-31T08:05:22Z")

</div>

@Badger - unfortunately it doesn't change anything.

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [August 3, 2025, 11:29am UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593/4 "2025-08-03T11:29:09Z")

</div>

Maybe logs were already read if you not set sincedb\_path in-memory database - /dev/null.

Can you enable the debug log.level and restart LS?

---

<div class="post-metadata">

**Author:** ![DetlefG](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@DetlefG](https://discuss.elastic.co/u/DetlefG)\
**Post date:** [August 5, 2025, 8:53am UTC](https://discuss.elastic.co/t/problems-reading-file-by-logstash-input-plugin-permissions/380593/5 "2025-08-05T08:53:43Z")

</div>

Thnx for all ansers. Meanwhile I found the reason. The reason is the ACL which is additional configured for the home directory of the user. I don't know who configured that, but it has to be changed.
