<?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>question Re: Nifi: Execute script creating a locked text file in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Execute-script-creating-a-locked-text-file/m-p/325133#M229534</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Solved:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, basically the problem was from Ubuntu side. The directory was under root privilege. Following command helped:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"sudo chmod a+rwx --path to directory--"&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 07:10:15 GMT</pubDate>
    <dc:creator>m_adeel</dc:creator>
    <dc:date>2021-09-23T07:10:15Z</dc:date>
    <item>
      <title>Nifi: Execute script creating a locked text file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Execute-script-creating-a-locked-text-file/m-p/325097#M229526</link>
      <description>&lt;P&gt;Hi. I am trying to write a text file from execute script with python. Whenever the processor executes, it creates a locked text file. How can I overcome this problem?&lt;/P&gt;&lt;P&gt;Following is the code&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from time import gmtime, strftime&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;import datetime&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;now = datetime.datetime.now()&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;current_time = now.strftime("%H:%M:%S")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;with open('**path to directory**/time.txt', "a") as f:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;current_time = str(current_time) + ('\n') &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;f.write(current_time)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;f.close()&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 14:29:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Execute-script-creating-a-locked-text-file/m-p/325097#M229526</guid>
      <dc:creator>m_adeel</dc:creator>
      <dc:date>2021-09-22T14:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi: Execute script creating a locked text file</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Execute-script-creating-a-locked-text-file/m-p/325133#M229534</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Solved:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, basically the problem was from Ubuntu side. The directory was under root privilege. Following command helped:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"sudo chmod a+rwx --path to directory--"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 07:10:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Execute-script-creating-a-locked-text-file/m-p/325133#M229534</guid>
      <dc:creator>m_adeel</dc:creator>
      <dc:date>2021-09-23T07:10:15Z</dc:date>
    </item>
  </channel>
</rss>

