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 194384

Summary: [70cat] java.io.FileNotFoundException: C:\glassfish3\glassfish\domains\domain1\config\default-web.xml (
Product: serverplugins Reporter: Chiana
Component: GlassFishAssignee: Vince Kraemer <vkraemer>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 165471
Attachments: stacktrace

Description Chiana 2011-01-15 13:06:25 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-6474-on-110115)
VM: Java HotSpot(TM) 64-Bit Server VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Windows Server 2008

User Comments:
Chiana: Hmm... This looks like the wrong message, the access to the file was for some reason denied, I'll check why in a jiffy, this should probable have been logged as an "access denied" error




Stacktrace: 
java.io.FileNotFoundException: C:\glassfish3\glassfish\domains\domain1\config\default-web.xml (
Comment 1 Chiana 2011-01-15 13:06:28 UTC
Created attachment 105031 [details]
stacktrace
Comment 2 Chiana 2011-01-15 13:30:26 UTC
As I suspected, normal users do not gain write access to program directories in servers unless they own the main directory.

Workaround is to give the group everybody full access to the installation directory (wich is not so good in a security point of view)
Comment 3 Vince Kraemer 2011-01-16 01:21:20 UTC
So... are you saying that you installed NetBeans as Adminstrator and then try to run it as some other user?
Comment 4 Chiana 2011-01-16 02:03:49 UTC
(In reply to comment #3)
> So... are you saying that you installed NetBeans as Adminstrator and then try
> to run it as some other user?

Something like that, normally when you run a program under server 2k8 it is not run as an administrator, you have to specify that it should run with administrative privileges (right-click->run as administrator), normally it denies modify access to everything that is from the root of the drive, when you install nb you have to specify administrative privileges to install it outside %programfiles% and as you already know I have netbeans in c:\netbeans and glassfish in c:\glassfish3, it makes it much easier to update by simply unpacking the builds to c:\.
The real problem in this case is probable that it inherits the rights that are set on the root, and those denies non administrative users modify access to all files (you can create a new file thou as long as it is not in the root itself).
I think the only way to fix this is to change the installer for glassfish to set a better set of accessrights on the glassfish\domain directory.
I don't think this can be fixed in netbeans except catching it and display a better warning than java.io.FileNotFoundException possibly prompting the user to seek out the administrator and have the accessrights corrected. Thats why I said it was the wrong message.

Also I like to change the workaround, you should probable give the group domain-users full access to glassfish\domains, that is probable more secure than giving it to everybody.
Comment 5 Vince Kraemer 2011-06-07 19:12:24 UTC

*** This bug has been marked as a duplicate of bug 184674 ***