Comment 29 for bug 1784774

Revision history for this message
Andrew Conway (acubuntuone) wrote :

Thanks Alberto. I tried running "hello" in a different directory, and you were correct:

arc@andrewfairfield:~$ hello
cannot open path of the current working directory: Permission denied
arc@andrewfairfield:~$ cd /
arc@andrewfairfield:/$ hello
Hello, world!
arc@andrewfairfield:/$

[ This is in 20.04, not 22.04 ]

Yay! that is the first time I have seen a snap actually work with my normal user account.

This feels like significant progress in working out what is going on!

Of course firefox needs access to the home directory to load the profile and store downloads. Is the whole process run as some other user (a la sudo) or is there just some starting stub running as some other user doing something that returns to the actual user after doing something that thinks it needs access to the current directory but could get by without it?

Actually, I can sort of answer that - I tried running "musescore" as a snap, starting from /
It successfully ran. I tried saving something, and it sort of did... but in a new, empty "home" directory in a /home/arc/snap/musescore/216/ that the save file dialog went to when I pressed the home button. Is this normal behaviour for a snap? Regardless of the inconvenience of the subdirectory, that is running over nfs successfully. I can close Musescore and load it again. But not with cwd=/home/arc.

So that is fairly strong evidence supporting your idea that it is the same root cause as https://bugs.launchpad.net/bugs/1973321 . I will add a comment there.

Thanks for the insight Alberto!