10

I am running Ubuntu 16.04 LTS and I have installed Zotero adding the PPA, following the instructions in this page. It worked all well, but when I try to get any update, I get the following error message:

enter image description here

In order to "modify the Zotero program directory to be writable by your user account" I applied sudo chmod 707 zotero, as described here and, as far as can see from the screen shot below (which was generated by the command ls -lg /usr/bin), the changes took place successfully:

enter image description here

Is there anything wrong with this terminal output? Shouldn't I have reading, writing and execute (rwx) permissions for user, according to this output?

0

7 Answers 7

6

With that command you only changed the permissions for the executable file, not for all the files the program uses (and probably needs to update).

I recommend that you chmod the /usr/bin/zotero file back to 755 and instead run the Zotero updater with sudo and it should have the rights needed to update itself.

EDIT: It is recommended to run sudo su to open up a root shell and then just run zotero as a command line command to open it with root rights. Directly running sudo zotero is not recommended because it uses your real home directory and you may end up with root-owned files in your home directory.

6
  • that makes sense. Do you know how I can run the Zotero updater with sudo?
    – BCArg
    Aug 1, 2017 at 10:26
  • 1
    @BCArg Assuming the Updater fires up as soon as you launch zotero, it should be enough to run sudo su to open up a root shell and then just run zotero as a command line command to open it with root rights. Directly running sudo zotero is not recommended because it uses your real home directory and you may end up with root-owned files in your home directory. Aug 1, 2017 at 10:31
  • 1
    @ Tim Schumacher. Thanks for the reply. When I ran sudo su then zotero a message dialog with the following messaged popped-up: "you appear to be running Zotero as root. This is insecure and may prevent Zotero from functioning when launched from your user account. If you wish to install an automatic update, modify the Zotero program directory to be writeable by your user account.". Do you think it is safe to continue? Anyways, the updates are not that important for me by now.
    – BCArg
    Aug 1, 2017 at 10:49
  • 1
    @BCArg The problem with changing the permissions for that directory (and all subdirectories and files) is that you probably won't be able to restore the original permissions on all files. As we changed the home directory to /root by running sudo su (instead of just running sudo zotero as the program seems to assume), it should all be fine if you continue and let it run the update. Aug 1, 2017 at 10:52
  • @ Tim Schumacher: thanks for the comments, but I think I will leave the update off. Zotero is running fine and, most importantly, this is not my own computer, otherwise I would assume the "risk".
    – BCArg
    Aug 1, 2017 at 11:01
4

I just came across this exactly same problem.

The following worked for me:

sudo chmod -R a+rwx /usr/bin/zotero && sudo chmod -R a+rwx /opt/zotero

Basically, this is giving Read+Write+Execute permissions to both folders.

1
  • 1
    works fine for Bionic (18.04) too
    – bcag2
    Nov 27, 2019 at 11:09
3

You'll want to also change the permissions of the /opt/zotero folder by running:

sudo chmod 707 /usr/bin/zotero && sudo chmod -R 707 /opt/zotero

1
  • 1
    why 707? I can't think of any good reason for that...
    – Zanna
    Mar 20, 2018 at 14:33
1

I just resolved the issue by changing ownership of ~/zotero directory and successfully upgraded from Zotero Help>Check for Updates... link. For some reason, previous ownership was held by 501, which is held by OSX user.

sudo chown -R <username>:<username>  ~/zotero
0

This depends on how (and where) did you install Zotero. I used the smathot/cogscinl repository to install mine (full installation instructions):

sudo apt-add-repository ppa:smathot/cogscinl

If this is your case, you will probably find your Zotero directory in /opt/zotero. You need to change the permission to the user that will update Zotero, basically this:

sudo chown USERNAME /opt/zotero
1
  • I followed these instructions. Zotero updated and restarted. However, upon restart, this method created the following error for me before the program reopened: "Zotero was unable to load translators and styles."
    – OpnSrcFan
    Apr 27, 2019 at 16:07
0

If you try to run Zotero as a root user you get the following warning:

You appear to be running Zotero as root. This is insecure and may prevent Zotero from functioning when launched from your user account.

If you wish to install an automatic update, modify the Zotero program directory to be writable by your user account.

I think the proper way to solve this issue is simply following the instruction to modify the Zotero directory to be writable by your user account:

sudo chown -R $USER:$USER /usr/bin/zotero
sudo chown -R $USER:$USER /opt/zotero
-1

In Ubuntu 16.04, I did the following:

  1. In the terminal execute Zotero as root

    sudo zotero

  2. Enter the password and press Continue to the following message

Press Continue

  1. In Zotero, click on menu Help -> Check for update, install it and restart. That's it!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .