Can't store linked attachments on a USB drive in Linux
I was using Zotero on Windows. Linked attachments (.pdf) were in c:/Users/John/Zotero/storage/ and I used Zotero to sync the entries (attachments were local-only). I copied the storage directory to a USB drive, and migrated to Ubuntu Linux, and installed Zotero from snap.
In Zotero, settings, advanced I set the 'Linked attachment base directory' to the USB drive's storage folder, and signed in for data syncing. That brought all my entries. But it created new, empty directories for the attachments in /home/zotero/snap/zotero-snap/common/Zotero/storage rather than using the USB drive. So I un-installed, re-installed, replaced /home/zotero/snap/zotero-snap/common/Zotero/storage with a symlinc to the storage directory on my usb drive, and turned on syncing.
Again, it downloaded the entries, but when I try to open the linked attachments (pdf) in Zotero I get an error like this: Could not write to `/home/john/snap/zotero-snap/common/Zotero/storage/AIUKDTZK/.zotero-ft-unprocessed.tmp': failed to open file for writing (NS_ERROR_FILE_ACCESS_DENIED)
Note that I can open a terminal, and with my local user create that very .tmp file at that path. So it's unclear why it says file access denied, since the local user has permission. Further, the .pdf is in that directory. But when I right-click the attachment in Zotero and choose 'Show file' nothing happens--it doesn't open the folder.
So, I've tried 2 methods to use the attachments on my USB drive: 1) Change Zotero settings to point to the USB drive. That doesn't work because it still uses the default. 2) Change the default storage to a symlink on the USB drive. That doesn't work either because, although the paths are write-able, there's something about a symlink that Zotero doesn't like.
Any ideas?
In Zotero, settings, advanced I set the 'Linked attachment base directory' to the USB drive's storage folder, and signed in for data syncing. That brought all my entries. But it created new, empty directories for the attachments in /home/zotero/snap/zotero-snap/common/Zotero/storage rather than using the USB drive. So I un-installed, re-installed, replaced /home/zotero/snap/zotero-snap/common/Zotero/storage with a symlinc to the storage directory on my usb drive, and turned on syncing.
Again, it downloaded the entries, but when I try to open the linked attachments (pdf) in Zotero I get an error like this: Could not write to `/home/john/snap/zotero-snap/common/Zotero/storage/AIUKDTZK/.zotero-ft-unprocessed.tmp': failed to open file for writing (NS_ERROR_FILE_ACCESS_DENIED)
Note that I can open a terminal, and with my local user create that very .tmp file at that path. So it's unclear why it says file access denied, since the local user has permission. Further, the .pdf is in that directory. But when I right-click the attachment in Zotero and choose 'Show file' nothing happens--it doesn't open the folder.
So, I've tried 2 methods to use the attachments on my USB drive: 1) Change Zotero settings to point to the USB drive. That doesn't work because it still uses the default. 2) Change the default storage to a symlink on the USB drive. That doesn't work either because, although the paths are write-able, there's something about a symlink that Zotero doesn't like.
Any ideas?
Upgrade Storage
2) We can't help with third-party packages. (The snap's sandboxing can break various things.)
So I would first go back to your Windows setup and use Zotmoov (or Attanger) to move all your linked attachments to another location on your PC. eg in Zotmoov, set the 'Move To' directory to the new location, then right-click Zotmoov: Move Selected to Directory. Do it in manageable-size chunks. Note that Zotmoov must be able to find the PDFs at the location currently stored in the Zotero database in order to move them. If you have set a Linked Attachment Base Directory (LABD) on that computer (or any other Zotero computer), Zotero/Zotmoov will use the LABD setting on that computer to find the PDFs.
Having established a "correct" location for your linked PDFs, you should be able to copy them to a USB drive and just update the LABD to point Zotero to where they are. So you should be able to open them there on your Windows PC (but if Zotero ever shows a "can't find PDF" error, you can point it to that PDF and it should offer to fix the recorded locations for all other linked PDFs ... in the same way as for that particular PDF).
Then you can set up in Linux (in the supported way), set a Linked Attachment Base Directory pointing to the USB, and Zotero should be able to find your PDFs again.