/home symlink, snaps don't work

Bug #1621102 reported by Marcin
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Low
Unassigned
snap-confine (Ubuntu)
Triaged
Undecided
Unassigned
snapd (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Problem:
$ hello-world
cannot bind mount /home to /tmp/snap.rootfs_vAgIND/home. errmsg: Permission denied

When /home is a symlink snaps don't work.
When /home is a real directory snaps work, see output below

Output:
marcin@ubuntu:~$ snap list
Name Version Rev Developer Notes
hello-test 0.01 1 suncheul-kim -
hello-world 6.3 27 canonical -
ubuntu-core 16.04.1 352 canonical -
marcin@ubuntu:~$ hello-world
cannot bind mount /home to /tmp/snap.rootfs_eILRgd/home. errmsg: Permission denied
marcin@ubuntu:~$ hello-test.hello
cannot bind mount /home to /tmp/snap.rootfs_A9iYc5/home. errmsg: Permission denied
marcin@ubuntu:~$ sudo rm -R /home && sudo mkdir -p /home/${whoami} && sudo chmod ugo+rwx /home/$whoami
marcin@ubuntu:~$ hello-test.hello
Hello, world!
marcin@ubuntu:~$ hello-world
Hello World!
marcin@ubuntu:~$ sudo rm -R /home && sudo ln -s /media/Dane/.home/ /home
marcin@ubuntu:~$ hello-world
cannot bind mount /home to /tmp/snap.rootfs_vAgIND/home. errmsg: Permission denied
marcin@ubuntu:~$

My configuration:

$ ll /home
lrwxrwxrwx 1 root root 18 Sep 6 20:02 /home -> /media/Dane/.home//

As /media/Dane is encrypted with LUKS+ext4 fs. I tried to use hardlink but they are not allowed for directories:(

Michael Vogt (mvo)
Changed in snapd (Ubuntu):
status: New → Triaged
Changed in snap-confine (Ubuntu):
status: New → Triaged
Michael Vogt (mvo)
Changed in snapd (Ubuntu):
importance: Undecided → High
Revision history for this message
Usievaład Kimajeŭ (anibyl) wrote :

No updates in 2017, I see.

Revision history for this message
mkovac (mkovac) wrote :

How long does a High importance bug stay "triaged"? It's not like the problem went away. The users did. The users went away.

So canonical grabbed them by the b*lls by making software available through snap exclusively - lxd, kubernetes, chromium-browser, etc

Revision history for this message
Ian Johnson (anonymouse67) wrote :

This has been covered extensively elsewhere, for example on the forum, etc. but we don't have immediate plans to support symlinked homes, and bind mounts are an appropriate work-around: https://snapcraft.io/docs/home-outside-home. I for some reason have lost my permission to change the snapd debian package priority, but it should also be "Low", like the snapd project here I just added.

Changed in snapd:
status: New → Triaged
importance: Undecided → Low
Alex Murray (alexmurray)
Changed in snapd (Ubuntu):
importance: High → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.