Chromium Browser (snap) Fails to Open Local Files from /tmp Directory

Bug #1901065 reported by Gunter Ohrner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 20.04
Linux Zweiblum 5.4.0-51-generic #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ snap info chromium
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: Canonical✓
store-url: https://snapcraft.io/chromium
contact: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bugs?field.tag=snap
license: unset
description: |
  An open-source browser project that aims to build a safer, faster, and more stable way for all
  Internet users to experience the web.
commands:
  - chromium.chromedriver
  - chromium
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
tracking: latest/stable
refresh-date: gestern um 18:33 CEST
channels:
  latest/stable: 86.0.4240.111 2020-10-21 (1362) 170MB -
  latest/candidate: 86.0.4240.111 2020-10-21 (1362) 170MB -
  latest/beta: 87.0.4280.20 2020-10-16 (1357) 172MB -
  latest/edge: 88.0.4292.2 2020-10-16 (1358) 173MB -
installed: 86.0.4240.111 (1362) 170MB -

I use a Java application which creates temporary HTML files in /tmp and then uses

  java.awt.Desktop.getDesktop().browse("file:/tmp/tempfile_xxxx.html")

to display this file in the system's default browser.

This worked fine till the upgrade from Ubuntu 18.04 to Ubuntu 20.04, where it broke completely.

Chromium is my default browser, but does not see the system /tmp dir, but only the one belonging to the snap.

So it just outputs an "file not found" message after correctly being invoked by xdg-open. :-(

Revision history for this message
Olivier Tilloy (osomon) wrote :

That's unfortunate, but this is working as intended. The sandbox provided to strictly-confined snaps (including chromium) doesn't allow access to the system-wide /tmp, to prevent untrusted applications from stealing data from others.

This was discussed at length there: https://forum.snapcraft.io/t/sharing-files-via-tmp/1613.

Changed in chromium-browser (Ubuntu):
status: New → Invalid
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.