27

I'm running Eclipse under a Windows 7, 64-bit installation on which I have administrator privileges.

Since I first installed Eclipse many months ago, I've been able to keep it up to date with the Help > Check for Updates function—but starting a couple of weeks ago, it gave the message

Insufficient access privileges to apply this update.

Even when I ran Eclipse as an administrator, I continued to get this message. How can I fix it?

9 Answers 9

33

For anyone using Linux: I had this problem in Ubuntu because I had installed Eclipse in /opt, which was owned by root.

To get the updates, simply run Eclipse as root and then select the Help -> Check for Updates again. In general running applications as root is not a good idea, but if it's just to do an update... well that's what the root account is for :)

cd /opt/eclipse
sudo ./eclipse
5
  • + you might need to temporarily disable -configuration @user.home/... in the eclipse.ini file
    – charlie
    Commented Jul 28, 2016 at 9:38
  • Should definitely be the accepted answer. One thing though, I have installed Eclipse in /opt since I can remember, but it was only with Oxygen that I got this error message. On the same Ubuntu version (16.04) with Neon I was able to update without sudo. Commented Feb 19, 2018 at 16:34
  • Should I use the actual workspace directory or should I use like /tmp? I mean if I update over the actual workspace, doesn't it install new files with root as owner?
    – sjngm
    Commented Jun 24, 2019 at 19:05
  • 1
    If you have installed on Ubuntu using snap, then use sudo /snap/eclipse/current/eclipse Commented Dec 8, 2021 at 14:11
  • Wrong answer. When you run eclipse as root, you have root's configuration of update sites (most likely default) instead of your regular user's, and as a result, root-run eclipse may not even detect the updates you are interested in. You must painstakingly transfer the update sites settings from the regular user's eclipse profile to the root's eclipse profile, and that is a horrible, messy, manual O(n) operation. Commented Apr 3 at 19:38
17

Another (simpler?) approach which worked for me is to simply give the group "Users" write permission on C:\Program Files (x86)\eclipse.

Now, this is a security consideration, but you're NOT granting access to the whole of C:\Program Files (x86), just the eclipse installation.

1
  • A bit safer is to give the actual user who is using Eclipse the write permission and not all users.. You can check which user it is by going into task manager and right clicking the properties on the eclipse executable.
    – e-motiv
    Commented Sep 27, 2016 at 20:38
13

I found a workaround for this stupid bug in Eclipse. Selecting updates one-by-one is disabled, but if you click Select all and then deselect the ones you do not need, you can proceed.

4
  • Looks like it is the only solution that worked in my case. A stupid bug indeed. Eclipse Neon by the way....
    – Eugene Sh.
    Commented Jun 12, 2019 at 14:29
  • This was the solution for me too. There's nothing wrong with my file permissions, just some check that Eclipse performs that's obviously flawed.
    – Nadar
    Commented Oct 19, 2019 at 17:48
  • Same here with the last version (Version: 2019-12 4.14.0) , on Ubuntu 18.04 Commented Mar 25, 2020 at 17:01
  • Still in 2021 version! Commented Mar 12, 2022 at 0:33
7

In Windows another option is to set the "Run as administrator" property on the Eclipse shortcut that you're using to start Eclipse. Right click on the shortcut and choose "Properties" from the dropdown menu. Click on the "Shortcut" tab in the Properties dialog and then click on the "Advanced..." button. In the Advanced Properties dialog set the "Run as administrator" option.

6

Hit same problem on Macos sierra 10.12.3 after clean install of Eclipse JEE Neon R. A clue was that my mac showed a dialog when I launched the app that asked:

“Eclipse.app” is an application downloaded from the Internet. Are you sure you want to open it?

When the updater dialog box showed "Insufficient access privileges to apply this update" I checked the Eclipse.app directory (I had downloaded & unpacked the .tar.gz file, if that matters) and saw this:

 drwxrwxr-x@  3 chris  staff         102 Jun 13  2016 Eclipse.app

I examined the extended attribute and saw this:

$ xattr Eclipse.app
com.apple.quarantine

That quarantine attribute seems to block the Eclipse updater! I removed that extended attribute like this:

xattr -d -r Eclipse.app

After that Eclipse updated itself very happily. HTH

3
  • 3
    This worked for Spring Tool Suite too but I had to be explicit about what to remove xattr -d com.apple.quarantine STS.app Commented Apr 8, 2017 at 16:42
  • Saved my day. Thanks @chrisinmtown. Commented Jun 5, 2017 at 0:50
  • Awesome, THANKS! Commented Mar 19, 2019 at 18:11
6

For Linux Distros, most personal apps for all users are installed in the /opt/ folder. This folder is owned by root. My solution which has been tested to work is simply to open the opt folder in terminal call 'ls' to make sure you see the 'eclipse' folder in your current directory. It may be inside another folder.

Then simply use this command replacing 'user' with your username.

sudo chown -R user:user eclipse/

and that's it. Of course only you will be able to run updates on eclipse but I imagine you are the primary user of the computer.

1
  • This one worked, but I have lost all the eclipse configurations and installed plugins, I have to reinstall them, which seems obvious. Commented Feb 12, 2022 at 14:05
3

Solving the problem was a multi-step process for me:

  1. In a thread on another forum I found the advice that Eclipse should not be installed in C:\Program Files (x86). I had indeed installed (unzipped) it into that folder, so I moved it as advised to C:\Users\....
  2. When I loaded Eclipse in its new location, I got a different message when I attempted to scan for updates: "There are no update sites to search".
  3. I temporarily re-established my installation in C:\Program Files (x86), loaded it, and used Window > Preferences > Install/Update > Available Software Sites > [select all] > Export... to create an .xml file with my software sites.
  4. Back in the C:\Users\... installation, I used the the same menu command (except Import instead of Export) to pull in the contents of that .xml file.

Now Help > Check for Updates is again functioning as it used to.

3

I fixed this problem (windows) by re-opening eclipse by right-clicking the eclipse.exe and selecting "Run as administrator".

Not sure why this step was needed all of the sudden but it worked. After my upgrade (I upgraded from eclipse sdk 4.3 -> 4.4) it still lets me make updates without running as administrator.

0

From Powershell, I set permissions on the folder like so:

& icacls "C:\ProgramData\chocolatey\lib\eclipse-java-neon\eclipse" "/grant" "domain\user:(OI)(CI)F" "/T"

Note: I had a different install location, as I used chocolatey to install eclipse

Not the answer you're looking for? Browse other questions tagged or ask your own question.