Closed Bug 1767868 Opened 3 years ago Closed 2 years ago

Ubuntu 22.04 snap firefox doesn't save downloads to /mnt subfolders

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 99
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: pnck, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

Steps to reproduce:

  1. I'm using Ubuntu 22.04
  2. I mounted internal hard disk to /mnt folder
  3. Firefox snap connection to removable-media is done.
  4. I started latest firefox snap.
  5. When I try to download file or save page to hard disks mounted to /mnt download process doesn't start.
  6. However download to /media works as expected.
  7. Moreover another snap GIMP saves files to /mnt.

pnck@ubuntupc:~$ lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04

pnck@ubuntupc:~$ apt-cache policy firefox
firefox:
Installed: (none)
Candidate: 1:1snap1-0ubuntu2
Version table:
1:1snap1-0ubuntu2 500
500 http://ru.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

pnck@ubuntupc:~$ snap info firefox
name: firefox
summary: Mozilla Firefox web browser
publisher: Mozilla✓
store-url: https://snapcraft.io/firefox
license: unset
description: |
Firefox is a powerful, extensible web browser with support for modern web application
technologies.
commands:

  • firefox
    snap-id: 3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
    tracking: latest/stable/ubuntu-22.04
    refresh-date: 2 days ago, at 19:34 MSK
    channels:
    latest/stable: 99.0.1-1 2022-04-13 (1232) 163MB -
    latest/candidate: 100.0-2 2022-05-02 (1300) 168MB -
    latest/beta: 101.0b1-1 2022-05-03 (1306) 169MB -
    latest/edge: 102.0a1 2022-05-03 (1307) 180MB -
    esr/stable: 91.8.0esr-1 2022-04-05 (1184) 161MB -
    esr/candidate: 91.9.0esr-1 2022-04-27 (1284) 161MB -
    esr/beta: ↑
    esr/edge: ↑
    installed: 99.0.1-1 (1232) 163MB -

pnck@ubuntupc:~$ snap connections firefox
Interface Plug Slot Notes
audio-playback firefox:audio-playback :audio-playback -
audio-record firefox:audio-record :audio-record -
avahi-observe firefox:avahi-observe :avahi-observe -
browser-support firefox:browser-sandbox :browser-support -
camera firefox:camera :camera -
content[gnome-3-38-2004] firefox:gnome-3-38-2004 gnome-3-38-2004:gnome-3-38-2004 -
content[gtk-3-themes] firefox:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] firefox:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] firefox:sound-themes gtk-common-themes:sound-themes -
cups-control firefox:cups-control :cups-control -
dbus - firefox:dbus-daemon -
desktop firefox:desktop :desktop -
desktop-legacy firefox:desktop-legacy :desktop-legacy -
gsettings firefox:gsettings :gsettings -
hardware-observe firefox:hardware-observe :hardware-observe -
home firefox:home :home -
joystick firefox:joystick :joystick -
mpris - firefox:mpris -
network firefox:network :network -
network-observe firefox:network-observe - -
opengl firefox:opengl :opengl -
personal-files firefox:dot-mozilla-firefox :personal-files -
removable-media firefox:removable-media :removable-media -
screen-inhibit-control firefox:screen-inhibit-control :screen-inhibit-control -
system-files firefox:etc-firefox-policies :system-files -
system-packages-doc firefox:system-packages-doc :system-packages-doc -
u2f-devices firefox:u2f-devices :u2f-devices -
unity7 firefox:unity7 :unity7 -
upower-observe firefox:upower-observe :upower-observe -
wayland firefox:wayland :wayland -
x11 firefox:x11 :x11 -

pnck@ubuntupc:~$ ls -la /mnt/
total 16
drwxr-xr-x 4 root root 4096 May 1 20:00 .
drwxr-xr-x 20 root root 4096 May 1 19:36 ..
drwxr-xr-x 11 pnck pnck 4096 May 3 13:33 Data
drwxrwxr-x 8 pnck pnck 4096 Jun 5 2021 VMs

pnck@ubuntupc:~$ mount | grep -e firefox -e mnt -e gimp
/var/lib/snapd/snaps/firefox_1232.snap on /snap/firefox/1232 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gimp_383.snap on /snap/gimp/383 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/dev/sda1 on /mnt/VMs type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks)
/dev/mapper/data_vg-data_lv on /mnt/Data type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks)
nsfs on /run/snapd/ns/snapd-desktop-integration.mnt type nsfs (rw)
nsfs on /run/snapd/ns/snap-store.mnt type nsfs (rw)
nsfs on /run/snapd/ns/firefox.mnt type nsfs (rw)
nsfs on /run/snapd/ns/gimp.mnt type nsfs (rw)

Actual results:

  1. Download process doesn't start
  2. There are not information about this download in download history
  3. There are not new files in destination directory

Expected results:

Download process should displays the progress bar. Firefox should display this download in history. And file should be saved in subdirectory in /mnt path.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Blocks: snap
Priority: -- → P3

Can you check whether there are apparmor denials reported in the system journal when the problem happens?

journalctl -f | grep DEN
Flags: needinfo?(pnck)

pnck@ubuntupc:$ journalctl -f | grep DEN
May 05 18:26:02 ubuntupc kernel: audit: type=1400 audit(1651764362.533:122): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:02 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:02 ubuntupc audit[942]: USER_AVC pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:02 ubuntupc audit[942]: USER_AVC pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:02 ubuntupc audit[942]: USER_AVC pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:02 ubuntupc kernel: audit: type=1107 audit(1651764362.613:123): pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:02 ubuntupc kernel: audit: type=1107 audit(1651764362.613:125): pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:02 ubuntupc kernel: audit: type=1107 audit(1651764362.613:127): pid=942 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/hostname1" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.125" pid=3673 label="snap.firefox.firefox" peer_pid=4788 peer_label="unconfined"
May 05 18:26:38 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:38 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:38 ubuntupc kernel: audit: type=1400 audit(1651764398.901:129): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:38 ubuntupc kernel: audit: type=1400 audit(1651764398.905:130): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:40 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:40 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:40 ubuntupc kernel: audit: type=1400 audit(1651764400.821:131): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:40 ubuntupc kernel: audit: type=1400 audit(1651764400.825:132): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:43 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:43 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:51 ubuntupc kernel: audit: type=1400 audit(1651764411.717:163): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:51 ubuntupc kernel: audit: type=1400 audit(1651764411.717:164): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:51 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:51 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:53 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:53 ubuntupc audit[3673]: AVC apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:53 ubuntupc kernel: audit: type=1400 audit(1651764413.173:165): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/etc/fstab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 05 18:26:53 ubuntupc kernel: audit: type=1400 audit(1651764413.173:166): apparmor="DENIED" operation="open" profile="snap.firefox.firefox" name="/run/mount/utab" pid=3673 comm="firefox" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
^C
pnck@ubuntupc:
$ ls -la /etc/fstab
-rw-rw-r-- 1 root root 777 May 1 20:00 /etc/fstab
pnck@ubuntupc:~$ ls -la /run/mount/utab
-rw-r--r-- 1 root root 1456 May 5 18:26 /run/mount/utab

Flags: needinfo?(pnck)

How do you mount to /mnt ? I'd guess it's not via something that removable-media expects, and this is why you dont have access ? Usually, drives mounted via gvfs are under /media as much as I can remember.

Flags: needinfo?(pnck)

I'm having the same issue. Reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=1773510

Andrey, can you repro on current versions as well? If you do, we could welcome a about:support as well as /usr/libexec/xdg-desktop-portal -rv and journalctl -f while reproducing.

Attached file xdg-desktop-portal (deleted) —
pnck@ubuntupc:~$ cat /etc/fstab | grep /mnt UUID=c38d3a54-6819-4595-bba0-271925de1d5d /mnt/Data ext4 rw,nosuid,nodev,uhelper=udisks 0 0 UUID=3b0e6c00-0dd7-4f93-b38e-7e0d81d4ee6a /mnt/VMs ext4 rw,nosuid,nodev,uhelper=udisks 0 0 About:support -> https://paste.ofcode.org/hxUcQPMh9VcRHCTpeKFni6

Please attach about:support on the bug, not a third-party website

I dont see any SaveFile in the xdg-desktop-portal log shared, did you reproduce the issue when capturing it ?

Alexandre, I'm sorry, this message have been written by mistake. Bugzilla portal also has some bugs, something about s3 access.

After couple of updates the issue with firefox does not exist now. And I can download files to any location in /mnt.

We can close this bug i think. Because i can't reproduce it now.

Flags: needinfo?(pnck)

(In reply to Andrey R. Masalov from comment #10)

Alexandre, I'm sorry, this message have been written by mistake. Bugzilla portal also has some bugs, something about s3 access.

For the about:support ? Weird, you should be able to attach it

After couple of updates the issue with firefox does not exist now. And I can download files to any location in /mnt.

We can close this bug i think. Because i can't reproduce it now.

Perfect, thanks for taking the time to verify!

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: