3

At least go to "classic". I don't want to sidestep the issue with links or bindmounts...

4
  • It's unclear if you're asking from the perspective of a user or a developer. Please add more details.
    – kyrofa
    Mar 2, 2020 at 18:52
  • AS a user, added to questoin
    – xenoid
    Mar 2, 2020 at 18:56
  • Let's assume that you are asking about changing the confinement only, not about switching channels which is quite easily done.
    – karel
    Mar 2, 2020 at 18:58
  • @karel Yes, as far as I understand the concepts
    – xenoid
    Mar 2, 2020 at 20:59

1 Answer 1

5

As a user, you have a limited amount of flexibility over how you want individual snaps confined. You can install a confinement: strict snap in devmode, for example:

$ sudo snap install --devmode <snap name>

You can also install a confinement: devmode snap in "jail" mode (i.e. treat it as strictly confined):

$ sudo snap install --jailmode <snap name>

What you cannot do, however, is install a confinement: classic as anything other than classic, or similarly a confinement: <not classic> snap as classic.

This limitation isn't to be annoying, it's because confinement: classic snaps are built entirely differently than confinement: <not classic> snaps, and in virtually all cases running them under another model would result in a segfault or something similar. This has to do with the fact that confinement: classic snaps do not use the core snap as its rootfs/execution environment like the other types of confinement, so it finds things like libc in a totally different place.

In general, I don't recommend taking advantage of the ability to install snaps under different confinement models unless you're utilizing them as a developer testing out your snap. Otherwise you'll be using the snap in a way that is probably completely untested by the snap author, and may or may not work properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .