I get Permission denied error when running a snap application, where my home directory is mounted on an nfs mount point that does not allow root-write.
This is not an unusual configuration, so I consider this a bug.
The error message:
cannot create user data directory: /home/tcumming/snap/vlc/4: Permission denied
Also had the same problem with ubuntu 16.
Some more info as requested:
Using the ubuntu, "Ubuntu Software" I install a snap application (for example, vlc). When I attempt to run it (from the command line), I get the, "Permission denied" message above.
I had just reinstalled Ubuntu on the machine, so there has been no messing around with the OS. I did preserve my uid:gid so I could mount my prior nfs share.
This is not a problem with the mount point, or nfs. Our mount point is not root-writeable for security reasons.
I guess the question is, should I file a bug report? What are my next steps?
Best Answer
Same happens in Ubuntu 18.04.
If the user home directory is not under the
/home
(or/
) mount, it not possible to work withsnap
. My HOMEDIR was on another local SSD disk, but since it was not mounted under/home
, every package installed by snap was failing.Since Canonical is moving to support snap, you will have to loose this kind of nice things, such as HOMEDIRs on other file systems, mounted by NFS, etc.
Maybe snap will be more flexible inthe future, but it is not a priority: https://forum.snapcraft.io/t/how-can-i-use-snap-when-i-dont-use-home-user/3352/6
The workaround right now is to remove
snap
and install things from*.tar.gz
or from*.deb
packages.