How do I allow a snap package to access a particular folder with name "~/.directory"?
For example, I have snapped Firefox (Ubuntu 22.04, FF is preinstalled out of the box by Canonical) and I want alow FF to access /home/$USER/.directory
. I did not installed FF, it is provided by Canonical out of box as part of Ubuntu 22.04.
Another directory can't be used. Because of hardcoded properties of Oauth2 related processes of internet service for another software. I can not use any other directory name other than ".directory". It's hardcoded in another software.
Also I see the folowing:
$ snap connections firefox | grep personal-files
personal-files firefox:dot-mozilla-firefox :personal-files -
The same question concerning Chromium (same problem). The same question about other snapped app. But, let's start from FF as example - what about FF.
Thank you!
P.S. One of the points of interest is: I have someone's snap package to be auto-updated. How do I grant access to ~/.directory
for the package in a way updates will not affect the permission?
P.S.S. The folowing doesn't work (from How to allow snap applications to access /tmp folder?):
sudo mount -o bind /home/$USER/.directory /home/$USER/snap/firefox/common/.directory
/home/me/.directory/.test
, My stock snap-Firefox could indeed see and open that testfile. See https://askubuntu.com/questions/1238211 for how to check that your Firefox snap interfaces for hidden subfolders is connected properly. – user535733 Jul 13 '22 at 14:20~/.*
at all. And FF is snapped software in this case.I.e. after
mkdir ~/.directory ; echo abc > ~/.directory/marker
FF unable to even browse content offile:///home/user/.directory/
FF reporting "Access to the file was denied".
In
/snap/firefox/current/snap/snapcraft.yaml
amonginterface: personal-files
the only mentioned dot-directory is$HOME/.mozilla/firefox
.No access to
– Asc Jul 14 '22 at 04:08~/.*
.snap connections firefox | grep personal-files
. – user535733 Jul 14 '22 at 05:32Still looking for solution.
– Asc Jul 11 '23 at 12:41