Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24040 - Cannot start tomcat as regular user when exporting CATALINA_BASE
Summary: Cannot start tomcat as regular user when exporting CATALINA_BASE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-07 03:26 UTC by squeeze
Modified: 2004-07-27 07:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description squeeze 2003-07-07 03:26:05 UTC
Hi! 
 
I'm using tomcat to develop webapps. I don't want to clutter up my tomcat installation by deploying 
my apps in /opt/tomcat. It is possible to export CATALINA_BASE=<my base> to have your own 
conf/ setup with config and users. 
 
With tomcat-4.1.24-r1 ebuild it is not possible to do so. Starting tomcat like this: 
 
%> export CATALINA_BASE=/home/mario/opt/tomcat 
%> /opt/tomcat/bin/startup.sh 
 
Gives me: 
-bash: /opt/tomcat/bin/startup.sh: Permission denied 
 
Yes, it's file permission problems! Easy to correct 
 
Anyway this was not the case in earlier versions. In the previous version the problem was the 
CATALINA_OUT variable which points out a file for stdout/err logging. This stopped the possibilites 
to use CATALINA_BASE, and it still do. The catalina.sh script will source the /etc/conf.d/tomcat file 
and override all env vars, which makes it impossible to run a private instance of tomcat. 
 
The proper way to fix this problem would be somthing like this: 
Remove the dependency between catalina.sh and conf.d/tomcat. Let the init script export the 
variables (if I'm correct, the rc-system already does this), then one could export the necessary 
variables to run a private instance and use /opt/tomcat/bin/startup.sh|catalina.sh to run tomcat. 
 
The CATALINA_OUT variable should be used by the init script instead of catalina.sh when starting 
tomcat which give the user the power to choose how to log stdout/err when running a private 
instance. 
 
Hope you understand my :) 
 
/Mario
Comment 1 Adrian Almenar 2003-12-19 21:55:25 UTC
Moving this again to java@gentoo.org, so everyone out there can help.
Comment 2 Thomas Matthijs (RETIRED) gentoo-dev 2004-07-27 07:03:16 UTC
i believe this now works again with the ebuilds i just commited(5.0.27) (didn't try to reproduce with the older ones)
just put yourself in the tomcat group

if you disagree, please reopen the bug