Hi,

I'm running Tomcat 5.5.20 with an application built under Netbeans 5.5.
The application works fine. I've found a number of things on the web
regarding the issue of running as a non-root user, but none match my
needs exactly. If someone could point me at the right documentation, or
answer directly, I'd be most grateful.

Situation - I am installing tomcat and running it on port 8080. However,
it is currently being started by the root user and I need to change
that.

If I just run the startup script as user 'foo', I get errors because it
can't read various config files in the conf directory, can't write to
the logs directory etc.

As a hack, I changed the permissions on the config files from 600 to
644, and the permissions on the logs directory to 777. I also had to
change the permission on the conf/Catalina/localhost directory to 777
and the server and manager.xml files therein to 644. After I did all
that, I could start tomcat, deploy my .war file and run it, and in fact
it all seems to work.

However, during startup I get error messages like this (from the
catalina.out file):

=========
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/jsp-examples is unusable.
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/balancer is unusable.
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/_ is unusable.
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/tomcat-docs is unusable.
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/servlets-examples is unusable.
Apr 11, 2007 10:32:33 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you
specified: /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost/webdav is unusable.
=============

Note that the permissions on /usr/local/Apache/Tomcat/apache-tomcat-5.5
.20/work/Catalina/localhost are 777, but the directories it is
complaining about (servlets-examples, webdav etc. don't exist...


So my questions are:

1) Is there a simple way for me to configure the system so I can run the
startup script as user 'foo' instead of 'root'?

2) If not, what is the hard way of doing it? :)  Does changing the
permissions where I did constitute a major security faux pas? I'm
guessing it might, but I'm not 100% sure...

3) Do I need to worry about these error messages? My application seems
to run in spite of them...

Thanks in advance,

nbc

NAME:   Neil B. Cohen (Verisign Inc.)
PHONE:  703-948-4471
DOMAIN: [EMAIL PROTECTED]
*************************************************************
* Murphy's Philosophy: Smile - tomorrow will be worse...    *
*                                                           *
* O'Tooles Commentary: Murphy was an optimist!              *
*************************************************************



---------------------------------------------------------------------
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