During startup, tomcat reads tomcat-users.xml and then immediately
writes it out again as tomcat-users.xml.new and afterwards renames
tomcat-users.xml.new to tomcat-users.xml (I don't know who invented that
...).
So either:
- the runtime user has write access to the directory tomcat-users.xml is
in (usually conf, but you can choose another one in server.xml), or
- you use at least Tomcat 5.5.12 (better 5.5.15 or 5.5.16) which has a
patch I submitted at 2005-08-04 that
- logs a nicer message when it cannot write out and proceeds startup
- allows tomcat-users.xml to be configured as readonly. I think it
works like this:
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
<parameter>
<name>readonly</name>
<value>true</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
Notice the new last parameter element:
<parameter>
<name>readonly</name>
<value>true</value>
</parameter>
Ali Kassem wrote:
Thanks, but i don't have file called tomcat-users.xml.new And the user
have read permission to tomcat-users.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]