Getting Data In

Splunk unable to read files

ankithreddy777
Contributor

Hi,
Splunk UF is setup to read files from particular directory. It reads files normally for few minutes, but suddenly it throws an error

WARN FilesystemChangeWatcher - error reading directory "xxxx/xxxx/xxx": Permission denied

Again when we reinstall splunk it reads normally and stops after few minutes showing permission denied.

May I know, Is there any reason that it suddenly shows permission denied error after reading half of the file.

Is there any possibility that when a file is written by some other process , It blocks other process to read the file?

Tags (1)
0 Karma

RohitMu
Explorer

have you checked the permission for that directory and if the user running splunk had read permissions for that directory?

0 Karma

ankithreddy777
Contributor

yes there are sufficient permissions. We could sudo to splunk user and open files to read

0 Karma

hortonew
Builder

This a UF on windows or linux? What's OS / splunk UF version?

0 Karma

ankithreddy777
Contributor

UF on linux. Redhat 7, splunk UF 6.5.7

0 Karma

hortonew
Builder

Are the ones that are failing in /var/log ? Can you confirm if you've set permissions there manually or have configured a custom umask on them that will allow "other" or a group the splunk user is part of to read/execute on directories and read files? Also can you confirm that you're not manually setting permissions there when you reinstall splunk, it "just works" after the reinstall.

ankithreddy777
Contributor

Splunk user is the part of the same group the file is part of
Ex:

drwxrwx--- user abc wer.log

Splunk user is part of abc group who has read permissions.
I haven't set any Manuel permissions

0 Karma

hortonew
Builder

Can you change to the splunk user (su - splunk) when the error occurs and less <file.log> without issue?

0 Karma

ankithreddy777
Contributor

Yes, I can sudo to splunk user and view the file.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...