[Solved] Permissions issue with Google Drive and Zotero/ZotMoov

A file permission error is preventing an application moving files to Google Drive.

I'm trying to troubleshoot a file permissions error that affects my use of the reference manager Zotero and using it with Google Drive. It's possibly related to Gnome's gvfs/gio abstraction layer and how applications interact with it. I'm out of my depth so am posting here for guidance. Apart from this issue, my general use of Google Drive with ZorinOS is working perfectly fine.

Software and system
Zorin OS 17.3 Core (based on Ubuntu 22.04 LTS, running Linux kernel 6.8.0-60-generic) with Gnome shell 43.9.
Zotero 7.0.15 (64-bit) installed via Flatpak
ZotMoov 1.2.21-fx.xpi installed manually from file.

Zotero is used to manage academic references including PDF attachments. It's desirable for me to store these large attachments on Google Drive and I use the plug-in ZotMoov to do this. However, this is not working correctly on my system: moving attachments to another local folder works fine, but moving them to Google Drive fails. It's looking like a folder permission issue according to the ZotMoov developer.

I specify my preferred Google Drive storage location using the Zotero/ZotMoov UI which shows a typical Gnome file location Google Drive/My Drive/My folder (say). This is recorded in the GUI as /run/user/1000/doc/ (which looks too short btw). When trying to copy a file to the new Google Drive location, an error is generated in the Zotero log:

(4)(+0001304): SELECT COUNT(*) FROM settings WHERE setting='mImport' AND key='cleanup'

(3)(+0000514): Path is /run/user/1000/doc/5f6d6118/1noihpXruVn-XEAa<snip>/Rothko et al. - 2014 - Artist's Reality Philosophies of Art.pdf

(1)(+0000001): NS_ERROR_FILE_ACCESS_DENIED Exception: Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.create] Zotero.File</this.createShortened@chrome://zotero/content/xpcom/file.js:872:14 move@jar:file:///home/me/.zotero/zotero/0trtd10s.default/extensions/zotmoov@wileyy.com.xpi!/src/02-zotmoov.js:228:52
(3)(+0000201): Scheduling next feed update

I do not know where to go next with this. Some web searching indicates that gvfsd-fuse might be a way of making Google Drive look more like a file system to ZotMoov; unrelated posts indicate that Flatpak versions of software sometimes skip desirable foundation components and some problems can be fixed by a fresh non-Flatpak installation. Regardless, I don't want to tinker around too much in case it makes things worse. Plus, I'd quite like to know what's causing the problem.

Thanks for reading this far. Any suggestions for a potential solution?

With the help of Flatseal, you can manage the file permissions of Flatpaks to grant a specific Flatpak program access to specific storage locations. You can install Flatseal via the Software Manager.
Then set the permission for zotero to all system files or all users files.

https://www.techrepublic.com/article/manage-flatpak-permissions-flatseal/

Instead of the Flatpak Version of this Program, You could download the Linux Version from the Developer and use that.

Flatpaks run containerized and have only limited Permissions. You could use flatseal like @Forpli alread suggested, too.

1 Like

Thank you, @Forpli and @Ponce-De-Leon for your suggestions.

I tried Flatseal but none of the file permission changes made any difference (giving Zotero access to system files and user files). ZotMoov was still unable to copy the files to Google Drive.

I uninstalled the flatpak of Zotero and installed the Linux version using zotero-deb as per the official instructions.

Zotero/ZotMoov now works as it should. Attachments are correctly stored on Google Drive!

Thank you for answering my question and providing the solution. I am very grateful for your help.

4 Likes