File permissions within a snap

Zygmunt Krynicki zygmunt.krynicki at
Wed Aug 24 11:01:45 UTC 2016

> Wiadomość napisana przez Jenny Murphy <jenny.murphy at> w dniu 24.08.2016, o godz. 12:58:
> Hi,
>  I have a java application built as a .snap.
> As part of its normal operation it will create some files (for output).
> However this is not successful due to permissions issue :
> For example , I tried to create the file in /home/ubuntu/examples/ :
> /home/ubuntu/examples/example.txt (Permission denied)
> I got a similar result whenI tired to create it in the current dir :
> /apps/gateway.sideload/IcNYWMFDGBeY

You can freely create files in $SNAP_USER_DATA - the per-user data directory or $SNAP_DATA - the global data directory (for daemons).

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.

You can do this by just defining a „home” plug on your application.

Best regards
> So is there a way around this?
> Thanks in advance for any suggestions.
> -- 
> Jenny Murphy
> EpiSensor, Georges Quay House, Georges Quay, Limerick, Ireland
> jenny.murphy at <mailto:jenny.murphy at>  t | +353 (0) 61 512 511  w | <>-- 
> Snapcraft mailing list
> Snapcraft at
> Modify settings or unsubscribe at:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Snapcraft mailing list