Dotfile directories specified in command-line are not readable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hello,
There appears to be some kind of permission issue with snap packages with the
"home" interface/
```
mkdir -p ~/.test/
mkdir -p ~/test/
echo "Hello, World!" > ~/.test/test.html
echo "Hello, World!" > ~/test/test.html
chmod -R 777 ~/.test/
firefox ~/.test/test.html # Works on Ubuntu 21.10 but not in 22.04.
chromium ~/.test/test.html # Fails on Ubuntu 21.10 and 22.04.
```
After debugging the above a bit, I realized that the main difference between
Ubuntu 22.04 and 21.10 is that Firefox uses a snap package in version 22.04 and
after testing a bit further, the same behaviour is present in at least Chromium,
Firefox and Gimp when trying to access a file inside of a 'hidden' (i.e.,
dotfile-directory) despite being situated inside the user home directory.
(I also tried this with Blender, but as that is a 'classic' snap, I guess it
circumvents the permission model)
However, I'm not sure if this is a bug or not. If this really is intended
behaviour though, the documentation (e.g.,
https:/
this and should additionally contain some not regarding how to disable this
'feature', since there are plenty of reasons to run applications inside of
dot-directories.
```
snap --version
snap 2.56
snapd 2.56
series 16
ubuntu 22.04
kernel 5.15.0-37-generic
```
affects: | snapcraft → snapd |
Changed in snapd: | |
status: | New → Confirmed |
Hi Gustaf, and thanks for reporting this bug. This is a known (and wanted) limitation of the "home" interface: it does not grant access to hidden files.
I'm keeping your bug open because indeed it would make sense to automatically grant a snap some permissions to accesso those paths explicitly mentioned in the command line.
I also too the liberty of rewriting the bug title so that it's easier to find it for us.