Why this error when upgrading "Exception: <class 'PermissionError'>, Value: [Errno 13] Permission denied"?


Upgrading to VERSION= I'm getting this error running as ROOT!!

Migrating to:


Copying '/opt/splunk/etc/myinstall/splunkd.xml' to '/opt/splunk/etc/myinstall/splunkd.xml-migrate.bak'.

Checking saved search compatibility...

Handling deprecated files...

Checking script configuration...

An unforeseen error occurred:

Exception: <class 'PermissionError'>, Value: [Errno 13] Permission denied: '/opt/splunk/etc/system/local/inputs.conf.tmp'

Traceback (most recent call last):
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 1353, in <module>
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 1206, in main
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 1061, in parseAndRun
retVal = cList.getCmd(command, subCmd).call(argList, fromCLI = True)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 293, in call
return self.func(args, fromCLI)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 30, in wrapperFunc
return func(dictCopy, fromCLI)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 189, in firstTimeRun
migration.autoMigrate(args[ARG_LOGFILE], isDryRun)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 3094, in autoMigrate
migInputs_3_3_0(migInputsConf, dryRun)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 1682, in migInputs_3_3_0
comm.sed(policySearch, policyReplace, path, inPlace = True)
File "/opt/splunk/lib/python3.7/site-packages/splunk/clilib/", line 1232, in sed
outFile = open(tmpPath, 'w')
PermissionError: [Errno 13] Permission denied: '/opt/splunk/etc/system/local/inputs.conf.tmp'

Please file a case online at

Error running pre-start tasks

Root is how I always run the upgrade process yet never have run into this issue before!

Labels (2)
0 Karma

Splunk Employee
Splunk Employee

I had the same problem going doing an upgrade from 8.2.4 to 8..5

I went to the directory where the permission error was shown at the end of the Traceback like this 

   f = open(path, 'w')

PermissionError: [Errno 13] Permission denied: '/opt/splunk/etc/system/local/indexes.conf'

Some of the files where read only so I did a  chmod 660 * and that fixed it.

0 Karma


I had this same problem when upgrading Splunk.

After untaring the TGZ file to my $SPLUNK_HOME.

ls -lah

This confirmed the owner of the folder changed to 10777

I went ahead and ran this line to fix permissions

chown -R splunk:splunk $SPLUNK_HOME


In your case change the user to root.


Hope that helps.

Tags (1)


This also worked for me.
Upgrade from 9.0.4 to 9.1.1

0 Karma

Splunk Employee
Splunk Employee

Thanks panguy, this is exactly what I needed!

0 Karma

Path Finder

1. Is Splunk offline?

2. Who owns the processes?

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...