[Geoserver-users] Upgrade bug with geotiff

Hi,

I have just tried to upgrade my geoserver application from Geoserver
1.5-RC1 to Geoserver 1.5-RC3. First, I followed the "upgrade tutorial
war file". The upgrade seemed to work well for most things including the
demos but I have a problem with my personal geotiff data. On the
Geoserver, I had only three pieces of data: 1 shapefile, 2 geotiff. The
shapefile works good, but the geotiffs appears smaller than what it
should. It is as if it had been miniaturized (something like 8x8 times
smaller!!!!). My Java server is Tomcat-5.5.12 and the platform is
Xubuntu Dapper Drake 6.06.1.
I have another question: How I am supposed to set the permission on the java server to allow the preview of my data when I put the data directory appart from the geoserver's directory. Because what I did was this:

grant codebase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/geoserver/-" {
        permission java.io.FilePermission "/datadirectory/-", "read,write,delete";
        permission java.util.PropertyPermission "*", "read,write";
        permission java.util.logging.LoggingPermission "control";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "preferences";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

But when I attempt to access the preview page it tells me:
GeoServer - Exception
The following exception was thrown:
java.security.AccessControlException: access denied (java.io.FilePermission /opt/SUNWappserver/domains/domain1/applications/j2ee-modules/geoserver/preview/gvtnc_communesConfig.xml delete)

Thank you so much if you could have look at that.

  Sylvain Broucke

Hi Sylvain,

sylvain broucke wrote:

Hi,

I have just tried to upgrade my geoserver application from Geoserver
1.5-RC1 to Geoserver 1.5-RC3. First, I followed the "upgrade tutorial
war file". The upgrade seemed to work well for most things including the
demos but I have a problem with my personal geotiff data. On the
Geoserver, I had only three pieces of data: 1 shapefile, 2 geotiff. The
shapefile works good, but the geotiffs appears smaller than what it
should. It is as if it had been miniaturized (something like 8x8 times
smaller!!!!).

Are your geotiff's actual geotiffs ( tagged ) or world image files (
.tif + .tfw ). There was a recent patch to the world image stuff that
might be throwing the rendering off. Andrea should better be able to know.

My Java server is Tomcat-5.5.12 and the platform is

Xubuntu Dapper Drake 6.06.1.
I have another question: How I am supposed to set the permission on the java server to allow the preview of my data when I put the data directory appart from the geoserver's directory. Because what I did was this:

grant codebase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/geoserver/-" {
        permission java.io.FilePermission "/datadirectory/-", "read,write,delete";
        permission java.util.PropertyPermission "*", "read,write";
        permission java.util.logging.LoggingPermission "control";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "preferences";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

But when I attempt to access the preview page it tells me:
GeoServer - Exception
The following exception was thrown:
java.security.AccessControlException: access denied (java.io.FilePermission /opt/SUNWappserver/domains/domain1/applications/j2ee-modules/geoserver/preview/gvtnc_communesConfig.xml delete)

Hmm, I have never had to do anything special with tomcat running on
linux even with an external data directory. Could it be another system
setting that is not allowing you to write to that directory. I notice
the directory trying to be written to is the one under your application
server. Are you sure the user runnign tomcat has write access to that
directory. Apologies if you have already verified this but its the only
thing i can think of.

Thank you so much if you could have look at that.

  Sylvain Broucke

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

sylvain broucke ha scritto:

Hi,

I have just tried to upgrade my geoserver application from Geoserver 1.5-RC1 to Geoserver 1.5-RC3. First, I followed the "upgrade tutorial war file". The upgrade seemed to work well for most things including the demos but I have a problem with my personal geotiff data. On the Geoserver, I had only three pieces of data: 1 shapefile, 2 geotiff. The shapefile works good, but the geotiffs appears smaller than what it should. It is as if it had been miniaturized (something like 8x8 times smaller!!!!). My Java server is Tomcat-5.5.12 and the platform is Xubuntu Dapper Drake 6.06.1.

I think it's a bug we introduced when trying to deal with rotated
images. It should be fixed with RC4 release.

I have another question: How I am supposed to set the permission on the java server to allow the preview of my data when I put the data directory appart from the geoserver's directory. Because what I did was this:

grant codebase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/geoserver/-" {
        permission java.io.FilePermission "/datadirectory/-", "read,write,delete";
        permission java.util.PropertyPermission "*", "read,write";
        permission java.util.logging.LoggingPermission "control";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "preferences";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

Hum, nice, I can merge with my (so far failed) attempt at a strict permission list and publish it on the running geoserver in production page. Quick question, do you have JAI installed in your JDK too?

But when I attempt to access the preview page it tells me: GeoServer - Exception
The following exception was thrown:
java.security.AccessControlException: access denied (java.io.FilePermission /opt/SUNWappserver/domains/domain1/applications/j2ee-modules/geoserver/preview/gvtnc_communesConfig.xml delete)

Yeah, Geoserver creates those files to enable MapBuilder make the map previews. In fact we could make all of these servlet calls to avoid
the need for writes, but for the moment, you'll have to give
Geoserver write permission on the preview folder.

Cheers
Andrea

Andrea Aime ha scritto:

sylvain broucke ha scritto:

Hi,

My Java server is Tomcat-5.5.12 and the platform is Xubuntu Dapper Drake 6.06.1.

I have another question: How I am supposed to set the permission on the java server to allow the preview of my data when I put the data directory appart from the geoserver's directory. Because what I did was this:

grant codebase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/geoserver/-" {
        permission java.io.FilePermission "/datadirectory/-", "read,write,delete";
        permission java.util.PropertyPermission "*", "read,write";
        permission java.util.logging.LoggingPermission "control";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "preferences";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

Hum, nice, I can merge with my (so far failed) attempt at a strict permission list and publish it on the running geoserver in production page. Quick question, do you have JAI installed in your JDK too?

Well, now I'm wondering how is it that your version works.
I removed the native JAI in the JDK and got a little further in my
permissions tests, coming up with the following:

// These permissions apply to the privileged admin and manager web applications
grant codeBase "file:/var/lib/tomcat5.5/webapps/geoserver/-" {
   permission java.io.FilePermission "/var/lib/tomcat5.5/webapps/geoserver/-", "read,write,delete";
   permission java.io.FilePermission "/var/lib/tomcat5.5/temp/-", "read,write,delete";
   permission java.util.PropertyPermission "java.media.*", "read,write";
   permission java.util.PropertyPermission "java.util.*", "read,write";
   permission java.util.PropertyPermission "org.geoserver.*", "read,write";
   permission java.util.PropertyPermission "org.geotools.*", "read,write";
   permission java.util.PropertyPermission "*", "read";
   permission java.util.logging.LoggingPermission "control";
   permission java.lang.RuntimePermission "preferences";
   permission java.lang.RuntimePermission "accessClassInPackage.org.apache.*";
   permission java.lang.RuntimePermission "getClassLoader";
   permission java.lang.RuntimePermission "shutdownHooks";
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
   permission java.lang.SocketPermission "-", "connect,resolve";
};

The problem now is that I can't open any jsp page, and get
xml parsing problems in web.xml and *.tld. Now, I thought the last
permission I added would have allowed tomcat to access all schemas
and dtd it needed, but apparently it does not work like this.
In my case it's an Ubuntu 6.10, Edgy Eft... the only way I've
found to make it work is to grant all permissions, which is not desirable.

Cheers
Andrea

Hi Andrea,

Well, I should have precised that the permissions I gave were the ones that I setted on a different server. This one is a Gentoo with a Sun Java System Application Server 8.1 . Something weird is I have never had to set any particular permission for my geoserver application on a Tomcat server to make it work just fine! But for the SJSAS I had to do it. When I grant all permission, everything works fine (of course), but when I set the permission as I described, I can access to the data through requests but I cannot launch the preview demo! I have a JAI 1.1.4 installed in my JRE.
  It could be good to find the best way to set the permission. Do you know why my geoserver just works fine with the Tomcat server (on the Xubuntu installed server) without any permission specified?
   Cheers

      Sylvain

Andrea Aime wrote:

Andrea Aime ha scritto:

sylvain broucke ha scritto:

Hi,

My Java server is Tomcat-5.5.12 and the platform is Xubuntu Dapper Drake 6.06.1.

I have another question: How I am supposed to set the permission on the java server to allow the preview of my data when I put the data directory appart from the geoserver's directory. Because what I did was this:
grant codebase "file:${com.sun.aas.installRoot}/domains/domain1/applications/j2ee-modules/geoserver/-" {
        permission java.io.FilePermission "/datadirectory/-", "read,write,delete";
        permission java.util.PropertyPermission "*", "read,write";
        permission java.util.logging.LoggingPermission "control";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "preferences";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

Hum, nice, I can merge with my (so far failed) attempt at a strict permission list and publish it on the running geoserver in production page. Quick question, do you have JAI installed in your JDK too?

Well, now I'm wondering how is it that your version works.
I removed the native JAI in the JDK and got a little further in my
permissions tests, coming up with the following:

// These permissions apply to the privileged admin and manager web applications
grant codeBase "file:/var/lib/tomcat5.5/webapps/geoserver/-" {
  permission java.io.FilePermission "/var/lib/tomcat5.5/webapps/geoserver/-", "read,write,delete";
  permission java.io.FilePermission "/var/lib/tomcat5.5/temp/-", "read,write,delete";
  permission java.util.PropertyPermission "java.media.*", "read,write";
  permission java.util.PropertyPermission "java.util.*", "read,write";
  permission java.util.PropertyPermission "org.geoserver.*", "read,write";
  permission java.util.PropertyPermission "org.geotools.*", "read,write";
  permission java.util.PropertyPermission "*", "read";
  permission java.util.logging.LoggingPermission "control";
  permission java.lang.RuntimePermission "preferences";
  permission java.lang.RuntimePermission "accessClassInPackage.org.apache.*";
  permission java.lang.RuntimePermission "getClassLoader";
  permission java.lang.RuntimePermission "shutdownHooks";
  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
  permission java.lang.SocketPermission "-", "connect,resolve";
};

The problem now is that I can't open any jsp page, and get
xml parsing problems in web.xml and *.tld. Now, I thought the last
permission I added would have allowed tomcat to access all schemas
and dtd it needed, but apparently it does not work like this.
In my case it's an Ubuntu 6.10, Edgy Eft... the only way I've
found to make it work is to grant all permissions, which is not desirable.

Cheers
Andrea

Sylvain Broucke ha scritto:

Hi Andrea,

...

It could be good to find the best way to set the permission. Do you know why my geoserver just works fine with the Tomcat server (on the Xubuntu installed server) without any permission specified?

Well, I guess you did install your own Tomcat instead of using the
one provided by the distribution? The latter is pretty much locked
down security wise (so locked down that imho most non trivial application would simply fail...)

Cheers
Andrea