Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 86169 invoked from network); 4 Aug 2005 13:21:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2005 13:21:36 -0000 Received: (qmail 73476 invoked by uid 500); 4 Aug 2005 13:21:12 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 73456 invoked by uid 500); 4 Aug 2005 13:21:12 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 73443 invoked by uid 99); 4 Aug 2005 13:21:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 06:21:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.227.118.3] (HELO mailserver.kippdata.de) (195.227.118.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 06:21:01 -0700 Received: from [195.227.30.175] (pfarr.kippdata.de [195.227.30.175]) by mailserver.kippdata.de (8.12.10/8.12.10) with ESMTP id j74DL7gP000454 for ; Thu, 4 Aug 2005 15:21:07 +0200 (MEST) Message-ID: <42F2168B.7000502@kippdata.de> Date: Thu, 04 Aug 2005 15:22:19 +0200 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: HELP: Tomcat 5.5.9 with jsvc as low priviledges user on Linux fails in Bootstrap References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N CVS head now includes an improvement: 1) If the directory containing tomcat-users.xml is not writeable you will get a nice warning instead of a strange exception. 2) You can configure the MemoryUserDatabase with the attribute readonly="true". Then there will be not write attempt at all. Details under http://issues.apache.org/bugzilla/show_bug.cgi?id=36020 Will be included in 5.5.11 most probably sometime during august. MC Moisei wrote: > Hi, > > I manage to configure my tomcat with jsvc(common-daemon) and everything > work great till I start to launch it as root. If I run it as tomcat user > it does work great. If I try to run it as root from command prompt or > from init.d I get the following exception ( see below ) > > Right are given as below > chown -R tomcat:tomcat /usr/local/tomcat > chown -R root:root /usr/local/tomcat/bin > chown -R root:root /usr/local/tomcat/common > > This is not right - looks like the bootstrap is trying to access the > Realm and there is no write access to the conf/tomcat-users.xml file. I > can't believe the common-daemon not tomcat side didn't say a thing about > this, I bet there are others experiencing the matter. > Do i have to disable Tomcat realms ? It doesn't sounds right. There is > no way I'd give "others" write access on that. > > Looking forward to hear from you if you experienced something similar. > Thanks, > MC > > > > > Aug 1, 2005 7:23:15 PM org.apache.naming.NamingContext lookup > WARNING: Unexpected exception resolving reference > java.io.FileNotFoundException: > /usr/local/tomcat/tomcat_home/conf/tomcat-users.xml.new (Permission denied) > at java.io.FileOutputStream.open(Native Method) > at java.io.FileOutputStream.(FileOutputStream.java:179) > at java.io.FileOutputStream.(FileOutputStream.java:131) > at > org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:462) > > at > org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:98) > > at > org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:129) > > at > javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301) > at org.apache.naming.NamingContext.lookup(NamingContext.java:792) > at org.apache.naming.NamingContext.lookup(NamingContext.java:152) > at > org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138) > > at > org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:108) > > at > org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:80) > > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:676) > at org.apache.catalina.startup.Catalina.start(Catalina.java:537) > 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:324) > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) > 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:324) > at > org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:218) > Aug 1, 2005 7:23:15 PM > org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans > SEVERE: Exception processing Global JNDI Resources > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org