First time snapcraft user having issues

Robert Park robert.park at canonical.com
Wed Sep 14 06:11:56 UTC 2016


On Sep 13, 2016 8:16 PM, "Sergio Schvezov" <sergio.schvezov at canonical.com>
wrote:
>
> El 14/09/16 a las 00:08, Robert Park escribió:
>
>
>> Hi all,
>>
>> So I want to snap up a script that needs root and does administrative
>> stuff on the host system. I realize this goes against snaps' goals of
>> being all secure and confined, is there any way I can list a plug in
>> my 'plugs:' that would give me root on the users computer, perhaps
>> giving the user a giant warning that they're installing something that
>> can break their system? Basically I don't want any confinement in my
>> snap at all.
>
>
> You can run as root (just use `sudo`), maybe just use `--devmode`
initially to get started.

You mean use sudo in my script? Or have the user run my script under sudo?
Either way I can't seem to run apt-get. Even bundling apt in my snap
doesn't work. I really need to get out of the confinement and run my script
as root on the host.

>
>
>> Also, is there a way to get a list of possible plugs? The
>> documentation only hints that network and network-bind exist, I found
>> some others by googling other people's snapcraft.yamls, but there
>> doesn't seem to be a way to query what the valid set of possible plugs
>> are (yeah, I suppose you could put anything in there, but I mean I
>> need to query what sockets exist that would make sense to put as my
>> plugs).
>
>
> Running `snap interfaces` on a system with snapd installed will give you
a nice list; the only other way I know is to look at
https://github.com/snapcore/snapd/tree/master/interfaces/builtin

Thanks, I'll try that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160913/50ebd65c/attachment.html>


More information about the Snapcraft mailing list