Snap doesn't work at all after I followed some instructions

I couldn’t open snaps so I followed this procedure:

sudo mv /var /var.BAK
sudo mkdir /var
sudo reboot

Now when I run

snap version

I get

snap 2.44.3+20.04
snapd unavailable
series -

and when I run

snap list

i get

error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: connection refused

and

systemctl status snapd.service

outputs

● snapd.service - Snap Daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-07-10 14:30:16 -03; 9min ago
TriggeredBy: ● snapd.socket
Process: 1253 ExecStart=/usr/lib/snapd/snapd (code=exited, status=1/FAILURE)
Main PID: 1253 (code=exited, status=1/FAILURE)
jul 10 14:30:16 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 5.
jul 10 14:30:16 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 14:30:16 Y50-70 systemd[1]: snapd.service: Start request repeated too quickly.
jul 10 14:30:16 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 14:30:16 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 14:30:16 Y50-70 systemd[1]: snapd.service: Triggering OnFailure= dependencies.

These commands have moved all of the snapd state from /var/lib/snapd/... to /var.BAK/lib/snapd which snapd does not understand. I’m not sure what instructions you followed that told you to do this but I don’t think this is likely to fix your problem. Can you try moving /var.BAK back to /var and then report back how snaps do not open for you?

I new to linux, how can i do that?

try running these commands on your system in the terminal:

sudo mv /var.BAK /var
sudo reboot

and then try running

snap version
snap install hello-world
snap run hello-world

snap version

returns

snap 2.44.3+20.04
snapd unavailable
series -

and

snap install hello-word

returns

error: cannot communicate with server: Post http://localhost/v2/snaps/hello-world: dial unix /run/snapd.socket: connect: connection refused

What is journalctl -e --no-pager -u snapd?

This is the output

– Logs begin at Fri 2020-07-10 15:46:30 -03, end at Fri 2020-07-10 16:23:45 -03. –
jul 10 15:46:32 Y50-70 systemd[1]: Starting Snap Daemon…
jul 10 15:46:33 Y50-70 snapd[939]: AppArmor status: apparmor is enabled and all features are available
jul 10 15:46:33 Y50-70 snapd[939]: cannot run daemon: fatal: directory “/var/lib/snapd” must be present
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:33 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 1.
jul 10 15:46:33 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: Starting Snap Daemon…
jul 10 15:46:33 Y50-70 snapd[1078]: AppArmor status: apparmor is enabled and all features are available
jul 10 15:46:33 Y50-70 snapd[1078]: cannot run daemon: fatal: directory “/var/lib/snapd” must be present
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:33 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 2.
jul 10 15:46:33 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: Starting Snap Daemon…
jul 10 15:46:33 Y50-70 snapd[1110]: AppArmor status: apparmor is enabled and all features are available
jul 10 15:46:33 Y50-70 snapd[1110]: cannot run daemon: fatal: directory “/var/lib/snapd” must be present
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:33 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 3.
jul 10 15:46:33 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 15:46:33 Y50-70 systemd[1]: Starting Snap Daemon…
jul 10 15:46:33 Y50-70 snapd[1199]: AppArmor status: apparmor is enabled and all features are available
jul 10 15:46:33 Y50-70 snapd[1199]: cannot run daemon: fatal: directory “/var/lib/snapd” must be present
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
jul 10 15:46:33 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:33 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 4.
jul 10 15:46:34 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 15:46:34 Y50-70 systemd[1]: Starting Snap Daemon…
jul 10 15:46:34 Y50-70 snapd[1222]: AppArmor status: apparmor is enabled and all features are available
jul 10 15:46:34 Y50-70 snapd[1222]: cannot run daemon: fatal: directory “/var/lib/snapd” must be present
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:34 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Scheduled restart job, restart counter is at 5.
jul 10 15:46:34 Y50-70 systemd[1]: Stopped Snap Daemon.
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Start request repeated too quickly.
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Failed with result ‘exit-code’.
jul 10 15:46:34 Y50-70 systemd[1]: Failed to start Snap Daemon.
jul 10 15:46:34 Y50-70 systemd[1]: snapd.service: Triggering OnFailure= dependencies.

Welcome to Linux, one of the really nice things with Linux that got me hooked back in the day was that is was so easy to change things. This of course also means it’s easy to break things. What I have learned it to never run any commands that I do not understand. That will make it much easier to understand whats going on and how to solve potential problems. This has of course also the added bonus of learning something new.

sudo mv /var /var.BAK
sudo mkdir /var

This will move (mv) the directory /var to /var.BAK and make a directory (mkdir) called /var, or in simple English: Rename var to var.BAK and make an empty var.

Linux is inspired from older UNIX-systems and have adopted the same directory layout, if you are curious you can read more about it here. “var” stands for “Variable files”, a place to store data that changes. This directory is used by a plenty of different applications (not only snapd) so by emptying /var you may have broken several applications.

Good thing, you have an backup in var.BAK, so it should be simple to restore. I assume you changed nothing else, and then executed the commands suggested by @ijohnson the backup (/var.BAK) was not properly restored. Instead of overwriting the empty /var, you moved var.BAK inside /var.

I would first look inside /var to make sure that the current state is what I think it is. For that use the list command (ls):

ls /var

That should list all non-hidden files inside the directory. On my system it looks like this:

$ ls /var
backups  cache  crash  lib  local  lock  log  mail  metrics  opt  run  snap  spool  tmp

I suspect that you only see your var.BAK directory there, or possible some other files that the system has re-created. If this is true, do this:

Move the backup directory back to it’s original position

sudo mv /var/var.BAK /

If /var contained additional files, save them (just in case you need them):

sudo mv /var /var.BAK2

or if var did not contain additional files, just remove the empty directory with “remove dir” (rmdir):

sudo rmdir /var

Now, run the commands suggested by @ijohnson:

sudo mv /var.BAK /var

This time, /var does not exists so the directory will be renamed from var.BAK to var.

Reboot the system, and try out the snap commands and see what happens:

sudo reboot
1 Like

Hey man thanks for the detailed explanation. I understand the commands now. However I’m still unable to run apps. For example

$ snap install hello-world
hello-world 6.4 from Canonical✓ installed

$ snap run hello-world
cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_Vw1U0P//dev: No such file or directory

I ran these exact commands

Is this message the same as the original error you got? or is this a new error?
I’m correct to assume you are running Ubuntu and 20.04 to be more precise?

Hi, can you also run these commands now:

snap version
snap debug confinement

This is a new error, the original I got was

$ snap install hello-word
error: cannot communicate with server: Post /* link here */ dial unix /run/snapd.socket: connect: connection refused

Yes, I’m running Ubuntu 20.04

(I posted the link in “/* link here */” above and am unable to post it again)

Sure

$ snap version
snap 2.44.3+20.04
snapd 2.44.3+20.04
series 16
ubuntu 20.04
kernel 5.4.0-40-generic

$ snap debug confinement
strict

Can you also run

SNAP_CONFINE_DEBUG=1 snap run hello-world

?

This is the output:

DEBUG: umask reset, old umask was 02
DEBUG: security tag: snap.hello-world.hello-world
DEBUG: executable: /usr/lib/snapd/snap-exec
DEBUG: confinement: non-classic
DEBUG: base snap: core
DEBUG: ruid: 1000, euid: 0, suid: 0
DEBUG: rgid: 1000, egid: 1000, sgid: 1000
DEBUG: apparmor label on snap-confine is: /usr/lib/snapd/snap-confine
DEBUG: apparmor mode is: enforce
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: opening lock file: /run/snapd/lock/.lock
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope (global), uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: ensuring that snap mount directory is shared
DEBUG: unsharing snap namespace directory
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: releasing lock 5
DEBUG: opened snap-update-ns executable as file descriptor 5
DEBUG: opened snap-discard-ns executable as file descriptor 6
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: opening lock file: /run/snapd/lock/hello-world.lock
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope hello-world, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: hello-world
DEBUG: snappy_udev_init
DEBUG: forked support process 6841
DEBUG: unsharing the mount namespace (per-snap)
DEBUG: changing apparmor hat to mount-namespace-capture-helper
DEBUG: helper process waiting for command
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: scratch directory for constructing namespace: /tmp/snap.rootfs_r1NyAb
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_r1NyAb//dev: No such file or directory

Do you have anything in /dev ? What’s the output of

ls -lah /dev/

$ ls -lah /dev/
total 4,0K
drwxr-xr-x 21 root root 4,3K jul 13 10:57 .
drwxr-xr-x 21 root root 4,0K jul 13 10:56 …
crw-r–r-- 1 root root 10, 235 jul 13 10:57 autofs
drwxr-xr-x 2 root root 260 jul 13 10:57 block
drwxr-xr-x 2 root root 60 jul 13 10:57 bsg
crw------- 1 root root 10, 234 jul 13 10:57 btrfs-control
drwxr-xr-x 3 root root 60 jul 13 10:57 bus
drwxr-xr-x 2 root root 4,4K jul 13 10:57 char
crw–w---- 1 root tty 5, 1 jul 13 10:57 console
lrwxrwxrwx 1 root root 11 jul 13 10:57 core -> /proc/kcore
drwxr-xr-x 2 root root 60 jul 13 10:57 cpu
crw------- 1 root root 10, 59 jul 13 10:57 cpu_dma_latency
crw------- 1 root root 10, 203 jul 13 10:57 cuse
drwxr-xr-x 7 root root 140 jul 13 10:57 disk
drwxr-xr-x 3 root root 140 jul 13 10:57 dri
crw------- 1 root root 240, 0 jul 13 10:57 drm_dp_aux0
crw------- 1 root root 10, 62 jul 13 10:57 ecryptfs
crw-rw---- 1 root video 29, 0 jul 13 10:57 fb0
lrwxrwxrwx 1 root root 13 jul 13 10:57 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 jul 13 10:57 full
crw-rw-rw- 1 root root 10, 229 jul 13 10:57 fuse
crw------- 1 root root 242, 0 jul 13 10:57 hidraw0
crw------- 1 root root 242, 1 jul 13 10:57 hidraw1
crw------- 1 root root 10, 228 jul 13 10:57 hpet
drwxr-xr-x 2 root root 0 jul 13 10:57 hugepages
crw------- 1 root root 10, 183 jul 13 10:57 hwrng
crw------- 1 root root 89, 0 jul 13 10:57 i2c-0
crw------- 1 root root 89, 1 jul 13 10:57 i2c-1
crw------- 1 root root 89, 2 jul 13 10:57 i2c-2
crw------- 1 root root 89, 3 jul 13 10:57 i2c-3
crw------- 1 root root 89, 4 jul 13 10:57 i2c-4
crw------- 1 root root 89, 5 jul 13 10:57 i2c-5
crw------- 1 root root 89, 6 jul 13 10:57 i2c-6
crw------- 1 root root 89, 7 jul 13 10:57 i2c-7
crw------- 1 root root 89, 8 jul 13 10:57 i2c-8
lrwxrwxrwx 1 root root 12 jul 13 10:57 initctl -> /run/initctl
drwxr-xr-x 4 root root 500 jul 13 10:57 input
crw-r–r-- 1 root root 1, 11 jul 13 10:57 kmsg
crw-rw----+ 1 root kvm 10, 232 jul 13 10:57 kvm
drwxr-xr-x 2 root root 60 jul 13 10:57 lightnvm
lrwxrwxrwx 1 root root 28 jul 13 10:57 log -> /run/systemd/journal/dev-log
brw-rw---- 1 root disk 7, 0 jul 13 10:57 loop0
brw-rw---- 1 root disk 7, 1 jul 13 10:57 loop1
brw-rw---- 1 root disk 7, 2 jul 13 10:57 loop2
brw-rw---- 1 root disk 7, 3 jul 13 10:57 loop3
brw-rw---- 1 root disk 7, 4 jul 13 11:01 loop4
brw-rw---- 1 root disk 7, 5 jul 13 10:58 loop5
brw-rw---- 1 root disk 7, 6 jul 13 10:57 loop6
brw-rw---- 1 root disk 7, 7 jul 13 10:57 loop7
crw-rw---- 1 root disk 10, 237 jul 13 10:57 loop-control
drwxr-xr-x 2 root root 60 jul 13 10:57 mapper
crw------- 1 root root 10, 227 jul 13 10:57 mcelog
crw-rw---- 1 root video 239, 0 jul 13 10:57 media0
crw------- 1 root root 241, 0 jul 13 10:57 mei0
crw-r----- 1 root kmem 1, 1 jul 13 10:57 mem
drwxrwxrwt 2 root root 40 jul 13 10:57 mqueue
drwxr-xr-x 2 root root 60 jul 13 10:57 net
crw-rw-rw- 1 root root 1, 3 jul 13 10:57 null
crw-rw-rw- 1 root root 195, 0 jul 13 10:57 nvidia0
crw-rw-rw- 1 root root 195, 255 jul 13 10:57 nvidiactl
crw-rw-rw- 1 root root 195, 254 jul 13 10:57 nvidia-modeset
crw-rw-rw- 1 root root 235, 0 jul 13 10:57 nvidia-uvm
crw-rw-rw- 1 root root 235, 1 jul 13 10:57 nvidia-uvm-tools
crw------- 1 root root 10, 144 jul 13 10:57 nvram
crw-r----- 1 root kmem 1, 4 jul 13 10:57 port
crw------- 1 root root 108, 0 jul 13 10:57 ppp
crw------- 1 root root 10, 1 jul 13 10:57 psaux
crw-rw-rw- 1 root tty 5, 2 jul 13 12:09 ptmx
drwxr-xr-x 2 root root 0 jul 13 10:57 pts
crw-rw-rw- 1 root root 1, 8 jul 13 10:57 random
crw-rw-r–+ 1 root root 10, 242 jul 13 10:57 rfkill
lrwxrwxrwx 1 root root 4 jul 13 10:57 rtc -> rtc0
crw------- 1 root root 249, 0 jul 13 10:57 rtc0
brw-rw---- 1 root disk 8, 0 jul 13 10:57 sda
brw-rw---- 1 root disk 8, 1 jul 13 10:57 sda1
brw-rw---- 1 root disk 8, 2 jul 13 10:57 sda2
crw-rw---- 1 root disk 21, 0 jul 13 10:57 sg0
drwxrwxrwt 2 root root 40 jul 13 12:09 shm
crw------- 1 root root 10, 231 jul 13 10:57 snapshot
drwxr-xr-x 3 root root 340 jul 13 10:57 snd
lrwxrwxrwx 1 root root 15 jul 13 10:57 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 jul 13 10:57 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 jul 13 10:57 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root tty 5, 0 jul 13 11:01 tty
crw–w---- 1 root tty 4, 0 jul 13 10:57 tty0
crw–w---- 1 gdm tty 4, 1 jul 13 10:57 tty1
crw–w---- 1 root tty 4, 10 jul 13 10:57 tty10
crw–w---- 1 root tty 4, 11 jul 13 10:57 tty11
crw–w---- 1 root tty 4, 12 jul 13 10:57 tty12
crw–w---- 1 root tty 4, 13 jul 13 10:57 tty13
crw–w---- 1 root tty 4, 14 jul 13 10:57 tty14
crw–w---- 1 root tty 4, 15 jul 13 10:57 tty15
crw–w---- 1 root tty 4, 16 jul 13 10:57 tty16
crw–w---- 1 root tty 4, 17 jul 13 10:57 tty17
crw–w---- 1 root tty 4, 18 jul 13 10:57 tty18
crw–w---- 1 root tty 4, 19 jul 13 10:57 tty19
crw–w---- 1 fseda tty 4, 2 jul 13 10:57 tty2
crw–w---- 1 root tty 4, 20 jul 13 10:57 tty20
crw–w---- 1 root tty 4, 21 jul 13 10:57 tty21
crw–w---- 1 root tty 4, 22 jul 13 10:57 tty22
crw–w---- 1 root tty 4, 23 jul 13 10:57 tty23
crw–w---- 1 root tty 4, 24 jul 13 10:57 tty24
crw–w---- 1 root tty 4, 25 jul 13 10:57 tty25
crw–w---- 1 root tty 4, 26 jul 13 10:57 tty26
crw–w---- 1 root tty 4, 27 jul 13 10:57 tty27
crw–w---- 1 root tty 4, 28 jul 13 10:57 tty28
crw–w---- 1 root tty 4, 29 jul 13 10:57 tty29
crw–w---- 1 root tty 4, 3 jul 13 10:57 tty3
crw–w---- 1 root tty 4, 30 jul 13 10:57 tty30
crw–w---- 1 root tty 4, 31 jul 13 10:57 tty31
crw–w---- 1 root tty 4, 32 jul 13 10:57 tty32
crw–w---- 1 root tty 4, 33 jul 13 10:57 tty33
crw–w---- 1 root tty 4, 34 jul 13 10:57 tty34
crw–w---- 1 root tty 4, 35 jul 13 10:57 tty35
crw–w---- 1 root tty 4, 36 jul 13 10:57 tty36
crw–w---- 1 root tty 4, 37 jul 13 10:57 tty37
crw–w---- 1 root tty 4, 38 jul 13 10:57 tty38
crw–w---- 1 root tty 4, 39 jul 13 10:57 tty39
crw–w---- 1 root tty 4, 4 jul 13 10:57 tty4
crw–w---- 1 root tty 4, 40 jul 13 10:57 tty40
crw–w---- 1 root tty 4, 41 jul 13 10:57 tty41
crw–w---- 1 root tty 4, 42 jul 13 10:57 tty42
crw–w---- 1 root tty 4, 43 jul 13 10:57 tty43
crw–w---- 1 root tty 4, 44 jul 13 10:57 tty44
crw–w---- 1 root tty 4, 45 jul 13 10:57 tty45
crw–w---- 1 root tty 4, 46 jul 13 10:57 tty46
crw–w---- 1 root tty 4, 47 jul 13 10:57 tty47
crw–w---- 1 root tty 4, 48 jul 13 10:57 tty48
crw–w---- 1 root tty 4, 49 jul 13 10:57 tty49
crw–w---- 1 root tty 4, 5 jul 13 10:57 tty5
crw–w---- 1 root tty 4, 50 jul 13 10:57 tty50
crw–w---- 1 root tty 4, 51 jul 13 10:57 tty51
crw–w---- 1 root tty 4, 52 jul 13 10:57 tty52
crw–w---- 1 root tty 4, 53 jul 13 10:57 tty53
crw–w---- 1 root tty 4, 54 jul 13 10:57 tty54
crw–w---- 1 root tty 4, 55 jul 13 10:57 tty55
crw–w---- 1 root tty 4, 56 jul 13 10:57 tty56
crw–w---- 1 root tty 4, 57 jul 13 10:57 tty57
crw–w---- 1 root tty 4, 58 jul 13 10:57 tty58
crw–w---- 1 root tty 4, 59 jul 13 10:57 tty59
crw–w---- 1 root tty 4, 6 jul 13 10:57 tty6
crw–w---- 1 root tty 4, 60 jul 13 10:57 tty60
crw–w---- 1 root tty 4, 61 jul 13 10:57 tty61
crw–w---- 1 root tty 4, 62 jul 13 10:57 tty62
crw–w---- 1 root tty 4, 63 jul 13 10:57 tty63
crw–w---- 1 root tty 4, 7 jul 13 10:57 tty7
crw–w---- 1 root tty 4, 8 jul 13 10:57 tty8
crw–w---- 1 root tty 4, 9 jul 13 10:57 tty9
crw------- 1 root root 5, 3 jul 13 10:57 ttyprintk
crw-rw---- 1 root dialout 4, 64 jul 13 10:57 ttyS0
crw-rw---- 1 root dialout 4, 65 jul 13 10:57 ttyS1
crw-rw---- 1 root dialout 4, 74 jul 13 10:57 ttyS10
crw-rw---- 1 root dialout 4, 75 jul 13 10:57 ttyS11
crw-rw---- 1 root dialout 4, 76 jul 13 10:57 ttyS12
crw-rw---- 1 root dialout 4, 77 jul 13 10:57 ttyS13
crw-rw---- 1 root dialout 4, 78 jul 13 10:57 ttyS14
crw-rw---- 1 root dialout 4, 79 jul 13 10:57 ttyS15
crw-rw---- 1 root dialout 4, 80 jul 13 10:57 ttyS16
crw-rw---- 1 root dialout 4, 81 jul 13 10:57 ttyS17
crw-rw---- 1 root dialout 4, 82 jul 13 10:57 ttyS18
crw-rw---- 1 root dialout 4, 83 jul 13 10:57 ttyS19
crw-rw---- 1 root dialout 4, 66 jul 13 10:57 ttyS2
crw-rw---- 1 root dialout 4, 84 jul 13 10:57 ttyS20
crw-rw---- 1 root dialout 4, 85 jul 13 10:57 ttyS21
crw-rw---- 1 root dialout 4, 86 jul 13 10:57 ttyS22
crw-rw---- 1 root dialout 4, 87 jul 13 10:57 ttyS23
crw-rw---- 1 root dialout 4, 88 jul 13 10:57 ttyS24
crw-rw---- 1 root dialout 4, 89 jul 13 10:57 ttyS25
crw-rw---- 1 root dialout 4, 90 jul 13 10:57 ttyS26
crw-rw---- 1 root dialout 4, 91 jul 13 10:57 ttyS27
crw-rw---- 1 root dialout 4, 92 jul 13 10:57 ttyS28
crw-rw---- 1 root dialout 4, 93 jul 13 10:57 ttyS29
crw-rw---- 1 root dialout 4, 67 jul 13 10:57 ttyS3
crw-rw---- 1 root dialout 4, 94 jul 13 10:57 ttyS30
crw-rw---- 1 root dialout 4, 95 jul 13 10:57 ttyS31
crw-rw---- 1 root dialout 4, 68 jul 13 10:57 ttyS4
crw-rw---- 1 root dialout 4, 69 jul 13 10:57 ttyS5
crw-rw---- 1 root dialout 4, 70 jul 13 10:57 ttyS6
crw-rw---- 1 root dialout 4, 71 jul 13 10:57 ttyS7
crw-rw---- 1 root dialout 4, 72 jul 13 10:57 ttyS8
crw-rw---- 1 root dialout 4, 73 jul 13 10:57 ttyS9
crw-rw---- 1 root kvm 10, 60 jul 13 10:57 udmabuf
crw------- 1 root root 10, 239 jul 13 10:57 uhid
crw-rw----+ 1 root root 10, 223 jul 13 10:57 uinput
crw-rw-rw- 1 root root 1, 9 jul 13 10:57 urandom
drwxr-xr-x 2 root root 60 jul 13 10:57 usb
crw------- 1 root root 10, 240 jul 13 10:57 userio
drwxr-xr-x 4 root root 80 jul 13 10:57 v4l
crw-rw---- 1 root tty 7, 0 jul 13 10:57 vcs
crw-rw---- 1 root tty 7, 1 jul 13 10:57 vcs1
crw-rw---- 1 root tty 7, 2 jul 13 10:57 vcs2
crw-rw---- 1 root tty 7, 3 jul 13 10:57 vcs3
crw-rw---- 1 root tty 7, 4 jul 13 10:57 vcs4
crw-rw---- 1 root tty 7, 5 jul 13 10:57 vcs5
crw-rw---- 1 root tty 7, 6 jul 13 10:57 vcs6
crw-rw---- 1 root tty 7, 128 jul 13 10:57 vcsa
crw-rw---- 1 root tty 7, 129 jul 13 10:57 vcsa1
crw-rw---- 1 root tty 7, 130 jul 13 10:57 vcsa2
crw-rw---- 1 root tty 7, 131 jul 13 10:57 vcsa3
crw-rw---- 1 root tty 7, 132 jul 13 10:57 vcsa4
crw-rw---- 1 root tty 7, 133 jul 13 10:57 vcsa5
crw-rw---- 1 root tty 7, 134 jul 13 10:57 vcsa6
crw-rw---- 1 root tty 7, 64 jul 13 10:57 vcsu
crw-rw---- 1 root tty 7, 65 jul 13 10:57 vcsu1
crw-rw---- 1 root tty 7, 66 jul 13 10:57 vcsu2
crw-rw---- 1 root tty 7, 67 jul 13 10:57 vcsu3
crw-rw---- 1 root tty 7, 68 jul 13 10:57 vcsu4
crw-rw---- 1 root tty 7, 69 jul 13 10:57 vcsu5
crw-rw---- 1 root tty 7, 70 jul 13 10:57 vcsu6
drwxr-xr-x 2 root root 60 jul 13 10:57 vfio
crw------- 1 root root 10, 63 jul 13 10:57 vga_arbiter
crw------- 1 root root 10, 137 jul 13 10:57 vhci
crw------- 1 root root 10, 238 jul 13 10:57 vhost-net
crw------- 1 root root 10, 241 jul 13 10:57 vhost-vsock
crw-rw----+ 1 root video 81, 0 jul 13 10:57 video0
crw-rw----+ 1 root video 81, 1 jul 13 10:57 video1
crw-rw-rw- 1 root root 1, 5 jul 13 10:57 zero
crw------- 1 root root 10, 249 jul 13 10:57 zfs

Mmm, yeah I’m really confused how snap-confine is failing there. What’s the output from these commands:

journalctl -e --no-pager | grep DENIED
journalctl -e --no-pager -u snapd

8 loop devices looks suspicious, doesnt the kernel normally pre-init 255 of them by default ?

$ journalctl -e --no-pager | grep DENIED

has no output

$ journalctl -e --no-pager -u snapd

has a massive output (too long to post), here it is: