Bug on apt install (permission denied)

As mentioned by others, the problem seems to happen when using the overlay2 storage backend in docker. This isn’t limited to the snap, but if you are using the snap then it’s the default configuration. To change this in the snap-installed version of docker:

  • edit /var/snap/docker/current/config/daemon.json and replace
    “overlay2” with “vfs” for the storage-driver
  • run sudo snap restart docker