[SOLVED] Permission issues with snapd and lxc containers.

INDIVISUM

Member
Apr 16, 2019
2
0
6
26
I've been trying to get snapd to work in lcx containers butIi get errors on both debian 9 and ubuntu 18.04.

I'm using a single node Proxmox VE 5.4-8 that is updated as of 05-july-2019 on the no-subscription repositories with the exception being that pve-manager is still 5.4-8 and not 5.4-10.

I used the ubuntu-18.04-standard_18.04.1-1_amd64 and debian-9.0-standard_9.7-1_amd6 templates, with clean installs ->update -> install snapd (no errors)->try to install a snap (nextcloud in this case)

These are the errors I get:

Code:
Ubuntu 18.04:
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-517447097: mount failed: Operation not permitted.

and

Code:
Debian 9:
error: cannot perform the following tasks:
- Mount snap "core" (7270) ([start snap-core-7270.mount] failed with exit status 1: Job for snap-core-7270.mount failed.
See "systemctl status snap-core-7270.mount" and "journalctl -xe" for details.
)

typing in
Code:
systemctl status snap-core-7270.mount
on debian i found:

Code:
 snap-core-7270.mount - Mount unit for core
   Loaded: loaded (/etc/systemd/system/snap-core-7270.mount; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-07-05 14:45:10 UTC; 2min 2s ago
    Where: /snap/core/7270
     What: /var/lib/snapd/snaps/core_7270.snap
  Process: 5438 ExecMount=/bin/mount /var/lib/snapd/snaps/core_7270.snap /snap/core/7270 -t squashfs (code=exited, status=32)

Jul 05 14:45:10 debunpriv104 systemd[1]: snap-core-7270.mount: Failed to reset devices.list: Operation not permitted
Jul 05 14:45:10 debunpriv104 systemd[1]: Mounting Mount unit for core...
Jul 05 14:45:10 debunpriv104 systemd[1]: snap-core-7270.mount: Mount process exited, code=exited status=32
Jul 05 14:45:10 debunpriv104 systemd[1]: Failed to mount Mount unit for core.
Jul 05 14:45:10 debunpriv104 systemd[1]: snap-core-7270.mount: Unit entered failed state.

Seems to me it boils down to permissions, but I don't know what to do to fix this.

  • I have tried creating both debian and ubuntu containers (both unprivileged and privileged).
  • I tried creating a new user with sudo permissions instead of using root.
  • I tried Ubuntu 19.04 with the same results as 18.04.
  • Every new attempt was made by creating a fresh container and doing update & updgrade before installing snapd and trying again.
  • I tried the same procedure in a VM running ubuntu 18.04 and it worked without error.
Am I missing something?
 
  • Like
Reactions: INDIVISUM