2

I've run into a bit of a weird issue: If I try to open a file-local .html file inside of a directory starting with a dot (.) the browser claims that it does not have permission to view it, e.g.:

mkdir -p ~/.test/
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.

Is this some kind of browser sandboxing issue? And if so, is there some common workaround in place?

One thing that I did note about Firefox: Ubuntu has moved to a snap package in 22.04, is that somehow related to these permissions? Additionally, Chromium appears to also be a snap package (in both cases).

1
  • I have the same issue.
    – Ray
    Nov 12, 2022 at 15:27

1 Answer 1

5

In case anyone else run across this problem:

This is a "bug/feature" (a buggy feature?) introduced by the change to run these browsers inside of snap packages. Currently, snap applications can only access files inside the home directory. Any file inside a directory starting with a dot is explicitly excluded.

However, there seems to be some "interest" to allow application access to a small subset of directories, as mentioned in the ticket I opened here:

https://bugs.launchpad.net/snapd/+bug/1979060

In essence, without explicit permissions from the application in question (which, if I understand things correctly, must be set at application build time), we cannot access files inside these directories.

And yes, I find this incredibly annoying and backwards-thinking.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .