My second snap ;-)

Sergio Schvezov sergio.schvezov at
Tue Oct 4 10:36:00 UTC 2016

El 04/10/16 a las 03:10, Didier Roche escribió:
> Le 03/10/2016 à 20:51, Robert Park a écrit :
>> On Sun, Oct 2, 2016 at 11:20 PM, Didier Roche <didrocks at> wrote:
>>> Le 02/10/2016 à 20:48, Robert Park a écrit :
>>>> Is there a plug to just read /etc? or a sensible way to set all those
>>>> env vars to /dev/null or something?
>>> Hey Robert,
>>> There is no plug to read from /etc on purpose. The goal is your snap to
>>> be relocatable and not relying on anything system-wide, so that it can
>>> run in different context. That's why you need to find a way to embedded
>>> this file and looking for local assets.
>> But aren't snaps running inside chroots? Why does "/etc" refer to the
>> system /etc instead of the /etc inside the snap chroot? Am I
>> understanding correctly that snaps bindmount the system /etc into the
>> snap chroot and then don't provide any permission to read anything in
>> there?
>> I think it would be nice if "/etc" was just inside my snap chroot and
>> my snap thus had total ownership of the entire dir.
> /etc refers to the one from the ubuntu-core snap + some bindmounts from
> systems. However, they are not an overlay for your snap and shared with
> the system.

It can get a bit confusing when writing snaps on desktops; there is a 
chroot but not so much for the snap but for core where the snap lives on 
top; it is all much more clearer if running an all snap system like 
Ubuntu Core.

More information about the Snapcraft mailing list