This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 227956 - Unable to start IDE as user if installed from C++ distro as root and extended as root
Summary: Unable to start IDE as user if installed from C++ distro as root and extended...
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 7.3
Hardware: PC Unix
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 228010 (view as bug list)
Depends on: 227982
Blocks:
  Show dependency tree
 
Reported: 2013-03-26 15:16 UTC by Vladimir Riha
Modified: 2013-07-02 06:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
content of user dir after extend (26.89 KB, text/x-log)
2013-03-26 15:16 UTC, Vladimir Riha
Details
IDE log with permission exception (8.96 KB, text/x-log)
2013-03-26 15:17 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-03-26 15:16:40 UTC
Created attachment 133090 [details]
content of user dir after extend

To reproduce:
- install C++ distro as root (sudo sh netbeans...)
- run IDE as root (sude sh netbeans...), extend to All (aka install PHP, JavaSE...)
- after extend, continue with restart
- close IDE, run it as common user

=> start fails because user dir for root and "user" are the same and extend action caused file/folders to be created(updated) with root permissions and under root:root 

Workaround - start IDE with new user dir as user or (I think) chmod/chown user dir.
Comment 1 Vladimir Riha 2013-03-26 15:17:17 UTC
Created attachment 133091 [details]
IDE log with permission exception
Comment 2 Vladimir Riha 2013-03-26 15:40:11 UTC
*
  Product Version         = NetBeans IDE 7.3 (Build 201302132200) (#93e87decaddf)
  Operating System        = Linux version 3.2.0-39-generic-pae running on i386
  Java; VM; Vendor        = 1.6.0_43; Java HotSpot(TM) Client VM 20.14-b01; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_43-b01
Comment 3 Jiri Rechtacek 2013-04-08 14:12:48 UTC
*** Bug 228010 has been marked as a duplicate of this bug. ***
Comment 4 Libor Fischmeistr 2013-07-02 06:54:28 UTC
This is hard to consider it as bug. When you launch NetBeans (or NB installer) using "sudo sh netbeans..." then even you use sudo command the environment variable $HOME still points to the home folder of regular user (in this case /home/vriha/). The NB userdir is created in $HOME/.netbeans/<userdir> but with permissions that allow only super user to write. If then you ran NB as regular user, userdir is the same $HOME/.netbeans/<userdir> but for regular user it's not writable. Basically you cannot expect that NB will work for two different users with same userdir. To install (or run) NB like super user you should use "sudo su netbeans..." command which uses different variable $HOME - usually points to "/root" folder.

I hope this explanation helped to clarify the problem.

Thanks