Markus Schönhaber wrote:
Tom Robinson wrote:
On Feb 16, 2007 03:18 PM, Markus=?iso-8859-1?q?Sch=F6nhaber?=

<[EMAIL PROTECTED]> wrote:
Caldarale, Charles R wrote:
From: Tom Robinson [mailto:[EMAIL PROTECTED]
Subject: IOException writing to
/usr/share/tomcat5/conf/tomcat-users.xml.new
[...]
Tomcat always updates tomcat-users.xml during startup, so the
directory
it's in must be write-enabled for the Tomcat userid.  (It actually
[...]
Thanks to you both, but I still get the exception.

Firstly I tried changing the directory permissions

chown tomcat4 /etc/tomcat5 --- no luck there
chmod 777 /etc/tomcat5 ---- also not working on restart

Hm, it seems expectable to me that changing the permissions of
/etc/tomcat5
won't make any difference, since the Exception says that it's
/usr/share/tomcat5/conf/tomcat-users.xml.new
which can't be written to.
You should try and change the permissions of /usr/share/tomcat5/conf - this is "the directory it's in" Chuck referred to.

You missed my other post to Chuck:

Currently I have CATALINA_HOME=/usr/share/tomcat5 and:

lrwxrwxrwx 1 root root 12 Jan 17 01:59 /usr/share/tomcat5/conf ->
/etc/tomcat5
drwxrwxr-x  4 root tomcat4 4096 Feb 16 15:06 /etc/tomcat5


I set the directory permissions back and tried to make the resource
readonly but still get the exception. Am I missing something fundamental
here?

Guessing[1] from the layout of the UserDatabase Resource in your server.xml, you're propably using Tomcat 5.0.x. AFAIR, the "readonly" parameter was introduced in some version of 5.5.x.

Sorry, 'my bad': tomcat 5.0.30. In which case, as you say, readonly won't help!
Also on CentOS4.4

I tried to put the tomcat-users.xml elsewhere:

drwxrwxrwx  2 tomcat4 tomcat4 4096 Feb 16 17:05 /tmptmp
-rw-r--r--  1 tomcat4 tomcat4 193 Feb 16 17:00 tomcat-users.xml

tomcat still balks on startup:

Created MBeanServer with ID: 116471f:110cb83aa97:-8000:---8<---fqdn---8<---:1
16-Feb-2007 17:05:09 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
16-Feb-2007 17:05:09 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1074 ms
16-Feb-2007 17:05:09 org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.io.IOException: IOException writing to /tmptmp/tomcat-users.xml.new
        at
org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:495)
---8<---
16-Feb-2007 17:05:09 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
createMBeans
SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: IOException writing to 
/tmptmp/tomcat-users.xml.new
        at org.apache.naming.NamingContext.lookup(NamingContext.java:803)
---8<---
16-Feb-2007 17:05:09 org.apache.catalina.core.StandardService start
INFO: Starting service Local
16-Feb-2007 17:05:09 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0
16-Feb-2007 17:05:09 org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.io.IOException: IOException writing to /tmptmp/tomcat-users.xml.new
        at
org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:495)
---8<---
16-Feb-2007 17:05:09 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  No UserDatabase component found under key UserDatabase
---8<---
16-Feb-2007 17:05:09 org.apache.catalina.startup.Catalina start
INFO: Server startup in 110 ms
---8<---

Thanks

t.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to