Database cannot be opened

Hey all,

Hoping to get some help with an issue I've been having. I recently got a new laptop and used the migration assistant to transfer over my files from my previous computer. Zotero didn't transfer so I re-downloaded it from the internet. I've run into what seems to be a pretty common problem with people here, but I'm just lost as a new Mac user and not a technologically gifted person.

I tried going into users--> my initials --> Zotero and then making all the permissions "read and write." That didn't solve the problem.

I also tried this terminal thing with the "Zotero debug" code and this is what it gives me:

JavaScript error: chrome://zotero/content/xpcom/db.js, line 686: Error: Error(s) encountered during statement execution: attempt to write a readonly database [QUERY: REPLACE INTO settings VALUES ('db', 'integrityCheck', 1)] [PARAMS: ] [ERROR: attempt to write a readonly database]
Missing chrome or resource URL: chrome://zotero/skin/16/white/loading.svg
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

Does anyone have any thoughts/should I be trying something else? Am I even doing the things right?
  • Open Terminal via Spotlight, paste this in, press Return, and let us know the result:

    ls -la ~/Zotero

    You can x out your username.
  • This is what it gives me!
    total 18784
    drwxrwxrwx 10 root wheel 320 10 Feb 21:53 .
    drwxr-xr-x+ 18 x staff 576 11 Feb 06:04 ..
    -rw-r--r--@ 1 x wheel 10244 10 Feb 21:53 .DS_Store
    drwxr-xr-x 4 root wheel 128 8 Feb 13:04 locate
    drwxr-xr-x 48 root wheel 1536 8 Feb 13:04 storage
    drwxr-xr-x 17 root wheel 544 8 Feb 13:04 styles
    drwxr-xr-x 728 root wheel 23296 8 Feb 13:04 translators
    -rw-r--r-- 1 root wheel 3239936 8 Feb 13:04 zotero.sqlite
    -rw-r--r-- 1 root wheel 3182592 8 Feb 13:04 zotero.sqlite.1.bak
    -rw-r--r-- 1 root wheel 3182592 8 Feb 13:04 zotero.sqlite.bak
  • edited yesterday at 3:21pm
    That's from Migration Assistant? That's certainly incorrect. This isn't a problem in Zotero — your user account just can't write to those files.

    You need to change the data directory ("Zotero") and all files within it to be owned by your user account, not "root". You can do that from Get Info in Finder.
  • Hey,
    I'm not sure what to say aside from I used the recommended "migration assistant" to move everything that I could from my old PC to Mac. At the end, it did say that some files weren't able to be transferred correctly. I also have one drive and when I downloaded that app, those files were just there.
    I tried to go to get info in finder but when I change those from read only to read and write, it says that the operation can't be completed because I don't have the necessary permissions.
  • Run this in Terminal:

    sudo chown -R `whoami` ~/Zotero

    It will prompt you for your password (but won't show the password while you're typing).

    There's nothing special about the Zotero folder, so I'd guess that other folders copied by Migration Assistant also have incorrect permissions (though it's strange — Migration Assistant is usually pretty good about transferring things properly).
Sign In or Register to comment.