Some snaps stops working if you have symlinks in your home folder
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Expired
|
Undecided
|
Unassigned |
Bug Description
Some snaps, in this example, Beekeeper Studio completely stops working if you have a symlink to some of the well known folders such as ~/Music in your home folder.
Repro steps
1. Make sure you have no symlinks into the root of your home folder
2. Install Beekeeper studio from https:/
3. Start Beekeeper studio and see that it starts properly
4. Exit beekeeper studio
5. Delete your ~/Music folder
6. Create a symlink from a device mounted in /mnt/ to your ~/Music folder
Example: $ ln -s /mnt/Green/
Note that in my setup, the home folder and the drive mounted under /mnt/Green share the same owner, group and permission set.
Note 2: It's possible to workaround the issue by uninstalling and then installing with --devmode. But that just doesn't feel all right to me at least.
description: | updated |
description: | updated |
Changed in snapd: | |
status: | Expired → New |
Changed in snapd: | |
status: | New → Confirmed |
status: | Confirmed → Won't Fix |
status: | Won't Fix → Incomplete |
I've reproduced this with beekeeper-studio. Running beekeeper-studio with snap run --strace shows this right before it exits (Music is a symlink to /mnt/foo directory owned by me):
[pid 4540] stat("/ home/pawel/ Music/" , {st_mode= S_IFDIR| 0755, st_size=4096, ...}) = 0 /home/pawel/ Music/test" , {st_mode= S_IFREG| 0664, st_size=0, ...}) = 0 /home/pawel/ Music/test" , {st_mode= S_IFREG| 0664, st_size=0, ...}) = 0 pawel/Music/ test' and '/h"..., 71) = 71
[pid 4540] lstat("
[pid 4540] lstat("
(... omitted irrelevant traces ...)
[pid 4540] write(2, "mv: ", 4) = 4
[pid 4540] write(2, "'/home/
[pid 4540] write(2, "\n", 1) = 1
[pid 4540] lseek(0, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
There are NO apparmor denials related to accessing these directories (journalctl|grep DENIED).
I've quickly created a simple test snap that has home and removable-media plugs and as long as they are connected, my snap is able to access /mnt/foo via Music symlink, and create a file there with no issues.
Do you know any other snap having similar problem?
The --devmode effectively disables the sandboxing, so yes it hides many issues. It should only be used be developers and not by end users of snaps.