[GeoNetwork-devel] [GeoNetwork opensource Developer website] #765: svn versioning crashes server if user home is write protected or does not exist

#765: svn versioning crashes server if user home is write protected or does not
exist
-------------------------+--------------------------------------------------
Reporter: jesseeichar | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.6.5
Component: General | Version: v2.6.4
Keywords: |
-------------------------+--------------------------------------------------
I have a tomcat instance that has the tomcat user. The tomcat user is not
a full user and there for the home directory does not behave as "normal"
home directories. Most importantly it seems the tomcat user cannot write
to it... Looking at the server it appears not even to exist. Therefore
subversion explodes when trying to write authentication credentials.

The credentials location needs to be able to be configured. or perhaps
default to data directory to make it portable.

along that vein, is there any reason the subversion directory doesn't
default to a subdirectory datadir as well?

Here is stack trace:

Raised exception while starting appl handler. Skipped.
Exception org.tmatesoft.svn.core.SVNException: svn: Cannot
create directory '/home/tomcat/.subversion/auth/svn.username'
Message svn: Cannot create directory
'/home/tomcat/.subversion/auth/svn.username'
Handler org.fao.geonet.Geonetwork
Stack org.tmatesoft.svn.core.SVNException: svn: Cannot create
directory '/home/tomcat/.subversion/auth/svn.username' at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at
org.tmatesoft.svn.core.internal.wc.DefaultSVNPersistentAuthenticationProvider.saveAuthentication(DefaultSVNPersistentAuthenticationProvider.java:305)
at
org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.acknowledgeAuthentication(DefaultSVNAuthenticationManager.java:228)
at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.getUserName(FSRepository.java:926)
at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.getCommitEditor(FSRepository.java:446)
at
     org.fao.geonet.kernel.SvnManager.getEditor(SvnManager.java:427) at
     org.fao.geonet.kernel.SvnManager.<init>(SvnManager.java:168) at
     org.fao.geonet.Geonetwork.start(Geonetwork.java:396) at
     jeeves.server.JeevesEngine.initAppHandler(JeevesEngine.java:524) at
     jeeves.server.JeevesEngine.init(JeevesEngine.java:160) at
     jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:76)
at
     javax.servlet.GenericServlet.init(GenericServlet.java:212) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993) at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at
     org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at
     org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at
     org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at
     org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at
     org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
     org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at
     org.apache.catalina.core.StandardHost.start(StandardHost.java:785) at
     org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
     org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at
     org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at
     org.apache.catalina.startup.Catalina.start(Catalina.java:581) at
     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
     java.lang.reflect.Method.invoke(Method.java:597) at
     org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at
     org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/765&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#765: svn versioning crashes server if user home is write protected or does not
exist
-------------------------+--------------------------------------------------
Reporter: jesseeichar | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.7.0
Component: General | Version:
Keywords: |
-------------------------+--------------------------------------------------
Changes (by simonp):

  * version: v2.6.4 =>
  * milestone: v2.6.5 => v2.7.0

Comment:

Yes - looks like a small change to
SVNWCUtil.createDefaultAuthenticationManager will allow us to config the
location of the credentials. Probably this should be in the data dir with
the repo as you suggest.

I'll test this and commit shortly.

Thanks,
Simon

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/765#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#765: svn versioning crashes server if user home is write protected or does not
exist
--------------------------+-------------------------------------------------
  Reporter: jesseeichar | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

Comment:

Fixed in svn commit 8649

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/765#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.