I am running Tomcat from jsvc daemon as user "tomcat". When I do this, I cannot run JSPs because Tomcat cannot create java files in the work directories and subsequently cannot compile them (cuz they're not there).
When I run Tomcat using startup.sh as user "root" I have no problems.
When I run Tomcat using startup.sh as user "tomcat", I can compile at least some of the java files, but there's another problem with one particular app which uses css stylesheets and the stylesheets don't get made properly.
Of course, the quick solution is to simply invoke startup.sh as root from my /etc/init.d/tomcat script. But according to instructions on the Apache site, I'm supposed to be able to run Tomcat as daemon using jsvc.
But something's amiss. I installed Tomcat as user "tomcat" and user "tomcat" owns the entire directory tree (ie. /usr/local/tomcat5/...).
I use the RPM version of Tomcat and that's only a problem when debugging (since my Eclipse setup is getting upset about Tomcat's rights vs. my user rights.
We had a problem in Solaris where Tomcat would be started as root and create the $TOMCAT_HOME/work directory under root rights, which would make the later runs under user tomcat fail - they couldn't write the compiled JSPs.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Feb 20, 2003
I run tomcat directly from the start scripts as - a problem I found running it as non-root is that you are prevented from using ports < 1024. You can always us IPTables to redirect to a non priviledged port though....
Joined: Nov 13, 2004
I had the same problem. Turns out it's a unix ownership issue. The following should fix it (assuming you're running jsvc as user 'tomcat')
chown -R tomcat /usr/local/tomcat
Replace the path with the correct one for your installation. I have no idea whether it's appropriate for the tomcat user to own all the directories, however...