<div dir="ltr">Hi,<div> Do I need to define the location of <span style="font-size:12.8px">SNAP_USER_DATA. Currently I added the following line to a wrapper script that already runs in my app :</span></div><div><span style="font-size:12.8px"><br></span></div><div><div style=""><span style="font-size:12.8px">echo "User Data = " $SNAP_USER_DATA</span></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The result is</div><div style="font-size:12.8px"> User Data =</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks a lot for you help. I guess this stuff is very basic but I am having to get up to speed quickly on snappy.</div><div style="font-size:12.8px">Jenny </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 August 2016 at 12:01, Zygmunt Krynicki <span dir="ltr"><<a href="mailto:zygmunt.krynicki@canonical.com" target="_blank">zygmunt.krynicki@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>Wiadomość napisana przez Jenny Murphy <<a href="mailto:jenny.murphy@episensor.com" target="_blank">jenny.murphy@episensor.com</a>> w dniu 24.08.2016, o godz. 12:58:</div><span class=""><br><div><div dir="ltr">Hi,<div> I have a java application built as a .snap.</div><div>As part of its normal operation it will create some files (for output).</div><div>However this is not successful due to permissions issue :</div><div>For example , I tried to create the file in /home/ubuntu/examples/ :</div><div>java.io.FileNotFoundException: /home/ubuntu/examples/example.<wbr>txt (Permission denied)</div><div>I got a similar result whenI tired to create it in the current dir :</div><div>/apps/gateway.sideload/<wbr>IcNYWMFDGBeY<br></div></div></div></span></blockquote><div><br></div>You can freely create files in $SNAP_USER_DATA - the per-user data directory or $SNAP_DATA - the global data directory (for daemons).</div><div><br></div><div>If you want to write to other locations you need an interface to do it. For example you can use the home interface to get write access to most of the $HOME directory.</div><div><br></div><div>You can do this by just defining a „home” plug on your application.</div><div><br></div><div>Best regards</div><div>ZK</div><div><blockquote type="cite"><div><span class=""><div dir="ltr"><div><br></div><div>So is there a way around this?</div><div><br></div><div>Thanks in advance for any suggestions.</div><div><br></div><div>-- <br><div data-smartmail="gmail_signature"><div><strong>Jenny Murphy</strong></div>
<div><strong>EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland</strong></div>
<div>jenny.murphy<a href="mailto:jenny.murphy@episensor.com" target="_blank">@episensor.com</a>  t | <a href="tel:%2B353%20%280%29%2061%20512%20511" value="+35361512511" target="_blank">+353 (0) 61 512 511</a>  w | <a href="http://www.episensor.com/" target="_blank">http://www.episensor.com</a></div></div>
</div></div></span><span class="HOEnZb"><font color="#888888">
-- <br>Snapcraft mailing list<br><a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br></font></span></div></blockquote></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><strong>Jenny Murphy</strong></div>
<div><strong>EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland</strong></div>
<div>jenny.murphy<a href="mailto:jenny.murphy@episensor.com" target="_blank">@episensor.com</a>  t | +353 (0) 61 512 511  w | <a href="http://www.episensor.com/" target="_blank">http://www.episensor.com</a></div></div>
</div>