Snappy Confinement and AppArmor
David Planella
david.planella at ubuntu.com
Mon Feb 23 12:11:16 UTC 2015
On Mon, Feb 23, 2015 at 10:17 AM, Oliver Grawert <ogra at ubuntu.com> wrote:
> hi,
> Am Montag, den 23.02.2015, 08:34 +0200 schrieb Mark Shuttleworth:
> > On 22/02/15 22:17, Víctor Mayoral Vilches wrote:
> > > * # Writable area*
> > >
> > > * owner /home/ubuntu/ w,*
> > > Which didn't work either. Could anyone point out how could i re-write
> the
> > > snap so that it can write in /home/ubuntu directory? I presume
> accessing
> > > hardware abstractions/files (e.g.: GPIOs) would be pretty much the
> same,
> > > right?
> >
> > AIUI apps get a place where they can write that is not tied to a
> > specific user, something like:
> >
> > /var/lib/snappy/<app>/
> >
> > That would be preferable to a default user like 'ubuntu'.
>
> seems our developer guide [1] needs updating. it points to /var/apps ...
> currently.
>
> the correct path is /var/lib/apps/<pkgname>/ <version>/
Thanks for the heads up Oli, updated the guide to point to /var/lib/apps/...
Cheers,
David.
> this path is
> exported into your environment as:
>
> $SNAPP_APP_DATA_PATH ...
>
> the guide points also to:
>
> /home/<user>/apps/<pkgname>/current/
>
> of which i have no clue about if it works, i haven't touched anything
> yet that needs user side configuration in snappy yet. but the
> environment points to this dir with:
>
> $SNAPP_APP_USER_DATA_PATH
>
> though beware ! if your app runs as root this will
> be /root/apps/<pkgname>/ by default.
>
> you can use both vars from your service startup script to do anything
> with data in them ... if you want to see all your environment just add
> the following line to one of your start scripts and restart the service:
>
> env >$SNAPP_APP_DATA_PATH/env.log
>
> ciao
> oli
>
> [1] https://developer.ubuntu.com/en/snappy/#snap-developers
>
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150223/80c11529/attachment.html>
More information about the snappy-devel
mailing list