<?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: Custom scripts raises error when executing SaveJSON on a file repository thing in ThingWorx Developers</title>
    <link>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/554318#M29133</link>
    <description>&lt;P&gt;I am using appKey associated with admin. I believe something was corrupted on TW server. I had to reboot Amazon Ubuntu instance. Unfortunately it entered inconsistent state so I cannot even reach it with ssh console.&lt;/P&gt;
&lt;P&gt;I was able to recreate my work on another TW server and it worked as expected with no special rights given to script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose if an admin user is executing services using an appKey, there is no need to add System Users for called services.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 14:26:03 GMT</pubDate>
    <dc:creator>rad1</dc:creator>
    <dc:date>2018-06-12T14:26:03Z</dc:date>
    <item>
      <title>Custom scripts raises error when executing SaveJSON on a file repository thing</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/553343#M29029</link>
      <description>&lt;P&gt;At some point I start receiving this error. I don't know what might have changed.&lt;/P&gt;
&lt;P&gt;I am usually the only on on TW machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wrapped java.io.FileNotFoundException: /ThingworxStorage/repository/ModelsFileRepository/Folder/SubFolder1/model1.json (Permission denied)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My script executes this at some point after figuring out the path and the content.&lt;/P&gt;
&lt;P&gt;Target folder for the json file is correct (i.e it exists)&lt;/P&gt;
&lt;P&gt;Things["ModelsFileRepository"].SaveJSON(params);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is about permissions what should I do to enable permissions. I am running from TW agent using Web socket or Rest API using an administrator appKey.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rad&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 23:54:45 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/553343#M29029</guid>
      <dc:creator>rad1</dc:creator>
      <dc:date>2018-06-07T23:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom scripts raises error when executing SaveJSON on a file repository thing</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/554253#M29124</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/272789"&gt;@rad1&lt;/a&gt;&amp;nbsp;just to confirm the user under which this service is getting executed has runtime permission on Subsystems and Resources? Or are all the services executed using only the Administrator account?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it be possible to attach application log from the time when you&amp;nbsp;reproduced this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 11:24:34 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/554253#M29124</guid>
      <dc:creator>supandey</dc:creator>
      <dc:date>2018-06-12T11:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom scripts raises error when executing SaveJSON on a file repository thing</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/554318#M29133</link>
      <description>&lt;P&gt;I am using appKey associated with admin. I believe something was corrupted on TW server. I had to reboot Amazon Ubuntu instance. Unfortunately it entered inconsistent state so I cannot even reach it with ssh console.&lt;/P&gt;
&lt;P&gt;I was able to recreate my work on another TW server and it worked as expected with no special rights given to script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose if an admin user is executing services using an appKey, there is no need to add System Users for called services.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:26:03 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Custom-scripts-raises-error-when-executing-SaveJSON-on-a-file/m-p/554318#M29133</guid>
      <dc:creator>rad1</dc:creator>
      <dc:date>2018-06-12T14:26:03Z</dc:date>
    </item>
  </channel>
</rss>

