<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python Script: Permission Denied in one of the Methods in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/546700#M9792</link>
    <description>&lt;P&gt;Apparently, the filename / path doesn't exist as&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'./' + temp_filename&lt;/PRE&gt;&lt;P&gt;When changed with absolute filepath, it worked.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Apr 2021 11:28:34 GMT</pubDate>
    <dc:creator>morethanyell</dc:creator>
    <dc:date>2021-04-05T11:28:34Z</dc:date>
    <item>
      <title>Python Script: Permission Denied in one of the Methods</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545867#M9788</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a working Python script that when ran as whoami=splunk in the same box, works just fine and as expected.&lt;/P&gt;&lt;P&gt;When the script is enabled in the Scripted Inputs with "every 5 min" schedule, one line in my ciode does not work and the python processor logs "Permission Denied" in index=_internal.&lt;/P&gt;&lt;P&gt;This is the line that doesn't work (Line&amp;nbsp; 3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Line 1.
temp_filename = sess + '.tmp'

Line 2.
wget_result = os.system('wget -O ./' + temp_filename + ' --append-output=' + LOGFILE_DIR_WGET + ' --user ' + svcacct_un + ' --password ' + svcacct_pw +  ' --no-check-certificate ' + _url)

Line 3.
checksum = hashlib.md5(open('./' + temp_filename, "rb").read()).hexdigest();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the Error looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;03-29-2021 15:55:17.507 +0100 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/***************" ./b97fcd39-1201-4638-8d41-8ae32168cd70.tmp: Permission denied&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545867#M9788</guid>
      <dc:creator>morethanyell</dc:creator>
      <dc:date>2021-03-29T15:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script: Permission Denied in one of the Methods</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545875#M9789</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/115107"&gt;@morethanyell&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Try to give the full permissions to the script file and restart. And check the output.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545875#M9789</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-29T15:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script: Permission Denied in one of the Methods</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545877#M9790</link>
      <description>&lt;P&gt;meaning give 777 to the script itself?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545877#M9790</guid>
      <dc:creator>morethanyell</dc:creator>
      <dc:date>2021-03-29T15:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script: Permission Denied in one of the Methods</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545878#M9791</link>
      <description>&lt;P&gt;yes..&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/545878#M9791</guid>
      <dc:creator>Vardhan</dc:creator>
      <dc:date>2021-03-29T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script: Permission Denied in one of the Methods</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/546700#M9792</link>
      <description>&lt;P&gt;Apparently, the filename / path doesn't exist as&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'./' + temp_filename&lt;/PRE&gt;&lt;P&gt;When changed with absolute filepath, it worked.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Apr 2021 11:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-Script-Permission-Denied-in-one-of-the-Methods/m-p/546700#M9792</guid>
      <dc:creator>morethanyell</dc:creator>
      <dc:date>2021-04-05T11:28:34Z</dc:date>
    </item>
  </channel>
</rss>

