bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

Can't find source path /mnt: Permission denied

Open fabricemarie opened this issue 4 years ago • 1 comments

bbwrap fails to run when an sshfs is already mounted under /mnt as root on the host.

versions:

bubblewrap-0.4.1-2.fc33.x86_64 flatpak-1.10.2-3.fc33.x86_64

reproduce

  1. mount an SSHFS from anywhere as root, under /mnt
  2. run as regular user any flatpak that you may have installed (it fails with all of them)
$ /usr/bin/flatpak run -v --branch=stable --arch=x86_64 --command=teams --file-forwarding com.microsoft.Teams
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/fabrice/.local/share/flatpak
F: Opening user flatpak installation at path /home/fabrice/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/fabrice/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Cleaning up unused container id 756181348
F: Allocated instance id 1018323690
F: Add defaults in dir /com/microsoft/Teams/
F: Add locks in dir /com/microsoft/Teams/
F: Allowing x11 access
F: Allowing pulseaudio access
F: Pulseaudio user configuration file '/home/fabrice/.config/pulse/client.conf': Error opening file /home/fabrice/.config/pulse/client.conf: No such file or directory
F: Running 'bwrap --args 41 xdg-dbus-proxy --args=43'
bwrap: Can't find source path /mnt: Permission denied
error: Failed to sync with dbus proxy

I'm not sure what bbwrap is trying to do with /mnt here.

fabricemarie avatar Jun 24 '21 08:06 fabricemarie

When Flatpak runs xdg-dbus-proxy (which is part of the host system, not part of the Flatpak app), it shares the entire host filesystem with it, because we don't (and can't) know how your host system is set up: you might have linked xdg-dbus-proxy to libraries in /mnt/ExtraLibraries or something (probably you haven't, but we can't know that).

It might be possible to avoid this by using --bind-try instead of --bind when setting up the container for xdg-dbus-proxy.

smcv avatar Jun 24 '21 10:06 smcv