<div dir="ltr"><div>Ok, it looks like the issue was related to me starting the app with sudo. After a restart and starting from a clean slate, the /tmp directory is working fine.</div><div><br></div><div>Also, I'm wondering if there is currently a way to initialize the SNAP_APP_DATA_PATH with default files provided by the snap?</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 9, 2015 at 10:07 AM Jamie Strandboge <<a href="mailto:jamie@canonical.com">jamie@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/09/2015 05:51 AM, Darren Landoll wrote:<br>
> I'm trying to use the SNAP_APP_TMPDIR and SNAP_APP_DATA_PATH<br>
> environment variables to store data for my application. After some<br>
> initial testing with SNAP_APP_TMPDIR, it appears to be set to "/tmp"<br>
> at runtime despite the launcher script setting it to the app specific<br>
> path under "/tmp/..." and the app is unable to write data.<br>
><br>
> Is this a known issue or could I be doing something wrong? I've been<br>
> running the app with sudo, not sure if that would make any difference<br>
> or not.<br>
><br>
At first, TMPDIR (and SNAP_APP_TMPDIR) was set to an app-specific directory and<br>
snaps had to honor this variable. It was found that far too many applications<br>
still do not honor TMPDIR and so instead the launcher now sets up a private<br>
mount namespace for the app, then bind mounts an app-specific directory on /tmp.<br>
<br>
In short, "/tmp" is the correct setting for the environment variable. Do note<br>
this bug though:<br>
<a href="https://bugs.launchpad.net/snappy/+bug/1473218" rel="noreferrer" target="_blank">https://bugs.launchpad.net/snappy/+bug/1473218</a><br>
<br>
--<br>
Jamie Strandboge <a href="http://www.ubuntu.com/" rel="noreferrer" target="_blank">http://www.ubuntu.com/</a><br>
<br>
--<br>
snappy-app-devel mailing list<br>
<a href="mailto:snappy-app-devel@lists.ubuntu.com" target="_blank">snappy-app-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel</a><br>
</blockquote></div></div><div dir="ltr">-- <br></div><div dir="ltr"><p dir="ltr">Darren</p>
<p dir="ltr">Sent from my mobile.</p>
</div>