accessdenied java error after uploading with file manager

I get this error after "upload and unpack" of a file: Failed to list /home/torv/public_html : java.security.AccessControlException : access denied (java.net.SocketPermission 123.123.123.123:10000 connect,resolve)

The file is uploaded fine, and refreshing. The ip adress is the right adress for the server (it's a vps, which might be the problem).

I'm completely stumped on how to debug this.

Status: 
Closed (fixed)

Comments

Howdy -- what browser and browser version are you using to access Virtualmin? Does it by chance work in a different browser?

Also, are you connecting to your Virtualmin system via a proxy, or is it behind a NAT gateway?

It's from a NAT gateway, I've had no problem with other virtualmin installs. So I'm guessing it's some way the VPS is set up.

We've tried in a few different browsers now. Firefox : Reports the error in the original report. Opera : Works, no errors. But while the popup window is open the entire background is black. Chrome : The guy I had testing it couldn't figure out how to allow the popup window coming up.

There are unfortunately some issues with Java and NAT that can cause this - it gets confused about what is the real IP of the system, and throws that exception because Java thinks the applet is connecting to an invalid IP :-(

What can we do about it? I doubt we're the only ones running virtualmin on a VPS setup.

This is the ifconfig output:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:68073 errors:0 dropped:0 overruns:0 frame:0 TX packets:68073 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5440360 (5.4 MB) TX bytes:5440360 (5.4 MB)

venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:26316022 errors:0 dropped:0 overruns:0 frame:0 TX packets:35598773 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:15750364907 (15.7 GB) TX bytes:42694082721 (42.6 GB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:123.123.123.123 P-t-P:123.123.123.123 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

Ip adress masked to 123.123.123 for security.

It isn't so much that you are using a VPS that triggers this, but rather that your Virtualmin system is being a NAT gateway. I generally recommend avoiding that for web hosting, as it adds additional complexity due to mismatches between the externally visible IP, and the IP the system thinks it has.

Yes but this is a java issue not a general hosting issue.

Short of building a new file manager, is there anything we can do about this? The file manager is the only big problem I have with virtualmin, but the popup based java solution is giving me headaches with a lot of clients on different browsers and setups.

If you like, I could login to your system myself to debug this further .. if that is possible, you can send me login details at jcameron@virtualmin.com . Even a domain owner login with access to the file manager would be useful.

Excelent, that'd be great! I'll mail you a login. :)

Thanks for the login ..

I just connected to your system, using Chrome on a Mac and the file manager loaded just fine!

Which browser and OS are you using there?

The file manager loads, but the file upload is broken.

On firefox it reports the error in the first post. On chrome the popup blocker hides the popup, and won't easily let our clients access it. On opera the popup works, and the entire back window goes black while its uploading.

My testers are on windows systems. Java is updated to the latest version, and so are most browsers (they are atleast very recent versions).

Ok, I figured out the cause now .. when you upload a zip file, the javascript code in the browser calls back to the file manager java code to refresh the directory listing in the UI. However, there appears to be some java security policy that prevents java functions called in this way from making network connections .. which is what causes that error window.

Fortunately it is mostly cosmetic, as the file does actually get uploaded OK - all you need to do is click Refresh to see the new directory listing. In the next webmin release, I will handle this case and suppress the error message.

Ok, I figured out the cause now .. when you upload a zip file, the javascript code in the browser calls back to the file manager java code to refresh the directory listing in the UI. However, there appears to be some java security policy that prevents java functions called in this way from making network connections .. which is what causes that error window.

Fortunately it is mostly cosmetic, as the file does actually get uploaded OK - all you need to do is click Refresh to see the new directory listing. In the next webmin release, I will handle this case and suppress the error message.

Automatically closed -- issue fixed for 2 weeks with no activity.