Bug 247637 - Netbeans will no longer start as regular user after installing update as root
Netbeans will no longer start as regular user after installing update as root
Status: NEW
Product: installer
Classification: Unclassified
Component: Code
8.2
PC Linux
: P4 with 8 votes (vote)
: TBD
Assigned To: Libor Fischmeistr
issues@installer
:
: 248801 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-02 10:59 UTC by pepijn
Modified: 2017-09-07 19:03 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Message log of failed start attempt. (9.12 KB, text/x-log)
2014-10-02 10:59 UTC, pepijn
Details
Update log 1/3 (252.73 KB, application/octet-stream)
2014-10-02 11:02 UTC, pepijn
Details
Update log 2/3 (976.64 KB, application/octet-stream)
2014-10-02 11:03 UTC, pepijn
Details
Update log 3/3 (976.78 KB, application/octet-stream)
2014-10-02 11:03 UTC, pepijn
Details
Update Error (1.14 KB, text/plain)
2015-06-30 10:53 UTC, MatthewLM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pepijn 2014-10-02 10:59:11 UTC
Created attachment 149668 [details]
Message log of failed start attempt.

I have Netbeans 8.0 installed on Ubuntu 14.04, in the /opt/netbeans directory. I installed it by running the installer as root, but normally run NetBeans as a regular user.

Today I was confronted with a large number of updates, one of which would not install, giving the rather obscure message "You don't have permission to install plugin Module Build Harness into the installation directory."

I therefore ran NetBeans as root using sudo, installed all updates, and then tried to run it as a regular user again. However, now it will no longer start!

The symptoms are that the progress bar hangs at "Reading module storage" for a number of seconds, and then the loading screen just disappears. No error message, no output to the console, nothing.

Please let me know how I can fix my NetBeans installation.

In addition, it seems to me that the following things need to be fixed:

* Whatever problem with the updates involved that caused this situation to occur should be fixed. If the user is directed to install an update as root, that should be possible without breaking their NetBeans installation!
* If a problem occurs during startup an error message should be displayed and/or something logged to the console. The startup screen should never be allowed to just disappear without any indication of what went wrong.

I will attach the messages.log of a failed start attempt. I can provide other log files if needed.
Comment 1 pepijn 2014-10-02 11:02:56 UTC
Created attachment 149669 [details]
Update log 1/3
Comment 2 pepijn 2014-10-02 11:03:20 UTC
Created attachment 149670 [details]
Update log 2/3
Comment 3 pepijn 2014-10-02 11:03:42 UTC
Created attachment 149671 [details]
Update log 3/3
Comment 4 pepijn 2014-10-02 11:08:48 UTC
Since messages.log contains a "java.io.IOException: Permission denied" exception I guessed that perhaps something in my ~/.netbeans had been tainted with root ownership due to installing updates as root, but a chown -R in that directory to make sure everything under it was owned by me did not change the situation. It still fails to start, with the same exception in the log.
Comment 5 pepijn 2014-10-02 11:10:19 UTC
NetBeans does still start if I run it as root using sudo. I don't really want to use it like that though, who knows what will become tainted with the wrong access rights.
Comment 6 pepijn 2014-10-02 11:32:03 UTC
I discovered how to fix the situation. Apparently NetBeans also creates files under ~/.cache, and under there many files had become owned by root. After changing the ownership of everything under ~/.cache/netbeans/8.0 to me, NetBeans will once again start as a regular user.

IMHO, in addition to the two points I mentioned above, I think it would also be good if NetBeans would be modified to log the name of the file it can't access whenever that happens, so users don't have to hunt about for it.
Comment 7 eggbert74 2014-10-16 20:20:49 UTC
Got hit by this as well.  There's no way to run the update without doing it through sudo, and then of course the ownership of a bunch of config files get changed to root.  I figured this would happen the minute netbeans started complaining about not having permission to do the update... 

Thanks to pepijn for finding the files in .cache that got changed.  

Please fix this!
Comment 8 Xypron 2014-11-21 18:59:24 UTC
*** Bug 248801 has been marked as a duplicate of this bug. ***
Comment 9 MatthewLM 2015-06-30 10:53:44 UTC
Created attachment 154439 [details]
Update Error
Comment 10 MatthewLM 2015-06-30 10:55:33 UTC
I've attached the error I get when trying to update NetBeans IDE 8.0 (Build 201403101706). I'm not sure what to do.
Comment 11 aroman 2017-02-22 15:39:41 UTC
Same thing happening in Ubuntu 16.10 with NetBeans 8.2 installed as root.
Comment 12 FelixNotTheCat 2017-03-21 22:52:03 UTC
Same thing in Lubuntu 16.10 with NetBeans 8.2 (was fine until recent change from xubuntu and subsequent upgrades).

Splash screen displaying 'reading module storage' then process exits with '2', same when calling netbeans in /usr/local/netbeans-8.2/bin/ directly as sudo (netbeans_jdkhome="/usr/lib/jvm/java-8-openjdk-amd64/" in netbeans.conf is correct).

Logging in as root calling Netbeans from desktop no problem.
Comment 13 FelixNotTheCat 2017-03-22 06:34:13 UTC
And all files within ~/.cache/netbeans/8.2/ are owned by user (as opposed to root).


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo