27

I just upgraded to Ubuntu 19.10 and to my horror I discovered that the default browser Chromium can no longer access other partitions than /home.

This means that my partitions containing music and videos (/multimedia) for instance are no longer accessible e.g. to upload into Google Drive. This includes USB partitions.

I found another description of this phenomenon here: https://fosspost.org/reviews/distributions/ubuntu-19-10-review where it says

"Also, while we acknowledge that most users will only need to access their home folders, it’s worthy to mention that you no longer can access system files & folders from inside Chromium (You can’t access anything except your home folder). This means that if you are to upload a file or an image for example into the Internet using an uploading website, then this file/image must be in your home folder, as you can not access directories such as /usr, /etc or other directories located in your root partition. In fact, you no longer can access any other partition at all, this includes USB sticks and other booted partitions:"

I wonder why this behaviour been introduced? it violates the whole idea of multiple disks, partitions and symlinks. Btw, this still works for Firefox.

My questions are

  • Are there any plans to fix this?
  • I expect one reason for this behaviour is about security. If so, is it possible to explain why and how that makes for better security? The files on other partitions are legitimately accessible by the user anyway e.g. through symlinks. But with this change, I'll have to move them to /home before uploading so still accessing them although more slowly and cumbersome.
  • If this behaviour is now permanent, the question is how should we incorporate multiple disks in our filesystem?
  • Alternatively, can someone tell me how to find and install the debian package. I haven't been able to locate it?

This is not a duplicate of What is the classic mode of snap, and why do some snaps not install without it (e.g. MS Visual Studio)? because that is about a specific error during installation that I didn't get. My question is about the access chromium has in Ubuntu 19.10.

Anyway, I solved the problem via the following command by using the original debian package from Google:

sudo apt-get install google-chrome-stable

After that I can now access my other partitions again. I know this is hacky in the sense that the package isn't native to Ubuntu so I would really like to get some advice on how to incorporate multiple disks and partitions with this new restricted behaviour of Chromium.

Thank you very much

uniomni
  • 401
  • 1
  • 4
  • 9

8 Answers8

21

If you do a search back you can see whatever I learnt about it in this thread https://discourse.ubuntu.com/t/call-for-testing-chromium-browser-deb-to-snap-transition/11179/ . I'll also point you to https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1832711 where I filed a bug about issue accessing my NFS shares

where Olivier Tilloy (osomon) states

If you connect the removable-media plug, you should be able to access files and directories mounted under /mnt and /media. That won’t resolve your issue with NFS shares seamlessly, but maybe you can mount them there?

Looking at that bug report I ran

snap connect chromium:removable-media

then I reported that drag&drop worked like it did before switch to snap.

I didn’t change my mounts as I didn’t want to, but I added a few extra mount entries in /etc/fstab to load the my shares in /mnt/ too for the directories (NFS for me) that I wanted to be able to access in chromium. After that I had no issues.

Please note as this was all done 13-June-2019, my memory is a now little faded… but what I did works for me equally well on my now Ubuntu 20.04.

guiverc
  • 33,561
5

Just mount the folder in your home like this:

enter image description here

Martin
  • 160
4

thanks to Dan Dascalescu for putting me on the right track

Just run the app as if it is not a snap \o/

  1. Use a menu editor eg. "Main Menu" to add a custom chromium "menu item" (this is what ubuntu uses to find apps when you press super+a) :
  2. Set Name eg.: Chromium Unsnapped
  3. Set Command: /snap/chromium/current/usr/lib/chromium-browser/chrome --user-data-dir=~/ChrUnsnapped --class="ChrUnsnapped" %U
  4. Set an icon eg. Download a retro chromium logo
  5. save/close
  6. super+a (or Show applications icon at bottom left) find your new item and right-click to add to favorites enter image description here

I am so super frustrated with snap that I can't configure my personal /stf dir like I have been doing for 15 years. Thank goodness for this hack, seems I'm going to have to do this for every freeken snap app :'( .

AmanicA
  • 1,887
3

I found a solution by mistake (!). What I wanted to do is have a separate Chromium instance (not just profile). Turns out that removed any sort of access restrictions from Chromium snap (!).

Chromium snap access to /bin/

Here's my ~/.local/share/applications/ChromiumUnsnapped.desktop based on the .desktop file spec:

[Desktop Entry]
Version=1.0
Name=ChrUnsnapped
Exec=/snap/chromium/current/usr/lib/chromium-browser/chrome --user-data-dir=~/ChrUnsnapped --class="ChrUnsnapped" %U
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=~/whatever-icon-you-want-for-ChrUnsnapped.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Actions=NewWindow;Incognito;TempProfile;
X-AppInstall-Package=chromium-browser
StartupWMClass=ChrUnsnapped
  • %U is for passing URLs.
  • --class="ChrUnsnapped" and StartupWMClass distinguish this Chromium instance from others.
0

It may be that you installed chromium as a snap through the snap store on the Ubuntu Software Center. If that is the case, go back to the chromium page on the Ubuntu Center and there should be a uninstall button and a settings icon to the right of that. Click on that, ant there will be a few permission options, and one of them would be storage related "I do not remember, but I recommend you select all of the boxes". Restart chromium and it should allow you to access your whole hard drive.

Second solution (Cause I am not certain about the first solution) - Manually install chromium or Google Chrome (recommended) through a .Deb file. Since Ubuntu is trying to be more snap-based with their software, some apps lose necessary permissions which you might need to manually grant through the software center.

0

Because the Chromium snap broke my workflow, I found a solution for installing via a Chromium DEB file. I used Kubuntu 19.10.

  1. Go to: https://www.chromium.org/getting-involved/download-chromium
  2. Pull down the latest DEB file: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/
  3. Unzip the file into a folder.
  4. Type Alt-Space (on Kubuntu) to open a command line at the top of the screen, then type "chrome" (without sudo)
  5. Pin it to a panel. Now it is available to run anytime.

I have noticed, though, that sometimes it becomes unresponsive and needs to be closed and restarted. Not sure why this is happening. But at lease Chromium can access the partitions I use.

mdh26
  • 11
0

You can create a file ~/.chromium-browser.init with content:

CHROMIUM_FLAGS="--class=\"ChrUnsnapped\""

This would do the same a instructed above by editing .desktop files. That file is sourced by wrappers that run if you just run chromium from the command line. See file /snap/chromium/current/bin/chromium.launcher

-3

The problem with chromium not being able to access other partitions than /home can be fixed by

1: Removing it 2: Installing the original debian package:

sudo apt-get install google-chrome-stable
uniomni
  • 401
  • 1
  • 4
  • 9