can't reset styles

I installed the latest Zotero update this morning and as always the styles disappeared. Before it's been possible to "reset styles" from the advanced/files and folders tab to make them reappear, but this doesn't work this time. What to do?

yours, thanks for a wonderful tool,

  • "As always"? That should never happen, so if it's happening regularly, there's something very wrong with your installation. Is this something you've reported before?

    Can you provide a Debug ID for Zotero startup through an attempt to reset styles, using the "Restart with Logging Enabled…" option?
  • Hi, thanks for speedy response. Yes, I keep on losing the styles with every update. It's been like that for the past six months or so. Previously I could always reinstall them, but now that doesn't work. And I can't reset the styles either. This is the ID: 674563823. I checked the database for integrity and it seems OK.

    If I try to manually reinstall the styles, I get error messages: "An unexpected error occurred while installing "" etc.

    very grateful,

  • Hi again,

    I've been using Zotero for a good 10 years by now, but I'm still learning stuff. Sorry, I've never debugged before. Here is the ID: Submitted with Debug ID D986176797

  • You're getting all sorts of permissions errors, including for writes to ~/Zotero/tmp:
    The file '/home/[…]/Zotero/tmp/ZZREFSYS.tmp' cannot be created.

    Check that the file is not currently in use and that its permissions allow write access.

    Restarting your computer or disabling security software may also help.
    The style error in particular is this:
    [JavaScript Error: "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIZipReader.extract]" {file: "chrome://zotero/content/xpcom/schema.js" line: 854}]
    I can't tell you what's causing this, but it's likely some security software you're running — AppArmor, SELinux, etc. Could also just be standard Unix permissions in your Zotero data directory, though that's probably less likely, unless you changed things manually.
  • Hi, great, thanks for getting back. I don't run any kind of security software (I'm on Ubuntu). Could be a permissions issue though, I suppose. What should the permissions be for the Zotero data directory?

  • Oh, I just had a brain wave -- The problem is probably caused by the way I update Zotero. I do it by logging in as sudo, ignoring the warnings, since this is the simplest way to get the update installed. Then I run Zotero once as sudo after the restart, but revert back to my individual account after that. This is probably the cause of the permissions mixup. What's the best way to proceed?

  • Everything in your Zotero data directory needs to be writable by your user account.
  • edited July 21, 2019
    And if you're going to use Zotero's built-in updater, you shouldn't have the program directory owned by root, since this will happen every time.

    Your options are basically to use a third-party package, which would allow you to keep the program directory owned as root but result in somewhat more delayed updates, or use the built-in updater, in which case it should be owned by your user account so it can update itself without your using sudo.
  • Thanks. Great help. I set the permissions to chmod 777 for the entire Zotero library, and the styles were returned to me. I assume that's safe. (This is on my own laptop)

  • While it's unlikely that it'd ever be a security problem on a personal machine, chmod -R 777 is just never the right thing to do.

    Directories should be 755 and files should be 644.

    cd ~/Zotero
    sudo chown -R `whoami` .
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
  • (And, to be clear, that also just wouldn't be a fix. If you continue updating as root, it will likely still create new files that weren't writable by your user account.)
Sign In or Register to comment.