Splunk Dev

Splunk app writing to a location

nb1016
Engager
We found a Splunk app which allows us to take a file and write it to our Splunk server before sending it off to a data store.
Due to issues with this app, I downloaded it, modified it, and re-uploaded it with some slight changes to the codebase. After this change, the new uploaded app does not have permissions to write to the filesystem, and we get this error "Unexpected error: [Errno 30] Read-only file system" when we try and use any of its alerts which write to a file.
This did not happen in the original app, which confuses me, as the logic for the file uploading, and the file destination have not changed.

These are the relevant bits of code which are throwing an error currently. Anyone know why this might not be working?

if not os.path.exists("out"):
os.makedirs("out")

filename= "out/"+sid+".csv"

For context, the only changes were that finaland we are running our instance on Splunk Cloud so do not have direct access to the filesystem to be able to debug why this issue is getting thrown.

Labels (2)
0 Karma
1 Solution

nb1016
Engager

Solved this issue by simply writing to the /tmp directory instead as everyone has read/write permissions there.

View solution in original post

0 Karma

nb1016
Engager

Solved this issue by simply writing to the /tmp directory instead as everyone has read/write permissions there.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...