MySQL Workbench (snap) shows permission denied error when I import files

Snaps certainly have some nice benefits but, when it comes time to get development work done, they have generally done little more than introduce friction. Generally, a snap is permitted to access the non-hidden contents of your home directory but, from the screenshot, something is clearly preventing this.

There are two options that I can think of to get around this:

Option 1 — Remove, then reinstall the snap with the "classic" mode option

This disables many of the container features that prevent snaps from running amok on your system, but generally works for many applications that need a little more access to the local file system.

sudo snap uninstall mysql-workbench-community
sudo snap install mysql-workbench-community --classic

Option 2 — Remove the snap and install the .deb

This will result in not having updates automatically installed on your system, but you will have an unrestricted application installed.

  1. Uninstall the snap:
    sudo snap uninstall mysql-workbench-community
    
  2. Download the appropriate installation package from Oracle: Download MySQL WorkstationNote: The smaller download will give you everything you need. The larger one comes with debug symbol support.
  3. Open "Files" and double-click on the MySQL Workbench download file to bring up the installer. Alternatively, if that doesn't work for some reason, then you can install the .deb via apt:
    sudo apt install ~/Downloads/mysql-workbench-community_8.0.25-1ubuntu21.04_amd64.deb
    

Hopefully one of these options will let you get some work done.