Firefox cannot open files in /usr/local/share/doc and /usr/share/javascript

Bug #1955325 reported by enz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Low
Unassigned
chromium-browser (Ubuntu)
Confirmed
Low
Unassigned
firefox (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Both Firefox and Chromium in Ubuntu 21.10 cannot open files in /usr/local/doc and show a File-not-found error. IMO this is a bug because this directory often contains HTML files from locally installed software that now cannot be browsed with these HTML browsers anymore.

The cause is probably the apparmor configuration in /var/lib/snapd/apparmor/profiles/snap.firefox.firefox, which contains a read permission for /usr/doc, but not for /usr/local/doc.

Paul White (paulw2u)
affects: chromium (Ubuntu) → chromium-browser (Ubuntu)
Revision history for this message
Olivier Tilloy (osomon) wrote :

There is a snapd interface for this (system-packages-doc¹), but it only grants read access to /usr/share/doc, not /usr/local/doc.

I wonder if the snapd folks would be interested in extending the interface to grant read access to /usr/local/doc, too?

¹ https://snapcraft.io/docs/the-system-package-doc-interface

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in firefox (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Ian Johnson (anonymouse67) wrote :

Read-only access to /usr/local/doc seems fine to me, should be pretty straight forward to extend the system-package-doc interface to also allow this directory too, only question would be if it should instead be a new interface like user-package-doc or something, but we can sort that out in a PR I think

Changed in snapd:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
enz (markus-enzenberger) wrote :

There is a typo in the title: the directory in question is /usr/local/share/doc, not /usr/local/doc.

Olivier Tilloy (osomon)
summary: - Firefox cannot open files in /usr/local/doc
+ Firefox cannot open files in /usr/local/share/doc
Revision history for this message
Paride Legovini (paride) wrote : Re: Firefox cannot open files in /usr/local/share/doc

I believe access to /usr/share/javascript should also be allowed, as several -doc packages shipping HTML documentation load javascript resources from there. See for example

$ apt rdepends libjs-mathjax | grep -- '-doc$' | wc -l
1246

Paride Legovini (paride)
summary: - Firefox cannot open files in /usr/local/share/doc
+ Firefox cannot open files in /usr/local/share/doc and
+ /usr/share/javascript
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.