chown issues in /etc/init.d/tomcat4
Henri, I noticed a problem with /etc/init.d/tomcat4 script and CATALINA_TMPDIR... I've been testing out the CATALINA_TMPDIR setting in this script and it appears very bad to have this set outside of the /var/tomcat4 directory because you chown the CATALINA_TMPDIR directory to tomcat user:group. For example: If I set CATALINA_TMPDIR to /tmp instead of /var/tomcat4/temp now my /tmp is chowned to tomcat4 (which really sucks). I issue as well applies to any other case where a directory is set which may be used by other programs/users. For example if I decided to send my logs to /var/log instead of /var/tomcat4/log and CATALINA_LOG got chowned, then my logging would be really screwed up. Luckly, I didn't chown it. -Mark Diggory -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: chown issues in /etc/init.d/tomcat4
GOMEZ Henri wrote: I noticed a problem with /etc/init.d/tomcat4 script and CATALINA_TMPDIR... I've been testing out the CATALINA_TMPDIR setting in this script and it appears very bad to have this set outside of the /var/tomcat4 directory because you chown the CATALINA_TMPDIR directory to tomcat user:group. For example: If I set CATALINA_TMPDIR to /tmp instead of /var/tomcat4/temp now my /tmp is chowned to tomcat4 (which really sucks). exact, and that's why I propose you to make a new directory, ie /var/spool/tomcat4 ;) Yes, a plus might be a comment to this effect in the /etc/tomcat4/conf/tomcat4.conf file to save people from discovering this first hand. :-) I issue as well applies to any other case where a directory is set which may be used by other programs/users. For example if I decided to send my logs to /var/log instead of /var/tomcat4/log and CATALINA_LOG got chowned, then my logging would be really screwed up. Luckly, I didn't chown it. Ditto, FHS recommand /var/log/tomcat4 But since you're adjusting the normal location, I'm sure you known what you do ;] Yep, I do. Just make my own directories in those locations. I'm just making comments as I run through the install and I notice issues. Currently I end up runing a config script of my own to configure tomcat after the rpm is installed. This is to prepare tomcat for our software installation. I catch alot of this stuff in there. If it seems like a good idea or an issue that could be solved in the rpm/scripts then I pass suggestions on to you guy's. thanks, Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
Think I did this right, didn't I? (I diff'ed my changes against tomcat_404_b2 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh) The patchfile is attached: -Mark Mark Diggory wrote: Which Tag is for 4.0.4 ? (tomcat_404_b2_01 or tomcat_404_b2) or do I want to do it against 4.1 (HEAD) -Mark GOMEZ Henri wrote: BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. dtomcat is just the rpm renaming of original catalina.sh... Index: catalina.sh === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v retrieving revision 1.20.2.3 diff -u -r1.20.2.3 catalina.sh --- catalina.sh 19 Mar 2002 18:24:36 - 1.20.2.3 +++ catalina.sh 30 Apr 2002 17:39:06 - @@ -17,6 +17,9 @@ # the JVM should use (java.io.tmpdir). Defaults to # $CATALINA_BASE/temp. # +# CATALINA_LOG(Optional) Provides alternate output locations for StandardOut +# and StandardErr +# # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the start, @@ -94,6 +97,11 @@ CATALINA_TMPDIR=$CATALINA_BASE/temp fi +if [ -z $CATALINA_LOG ] ; then + # Define the default location for StandardErr and StandardOut to use for Catalina +CATALINA_LOG=$CATALINA_BASE/logs/catalina.out +fi + # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --path --windows $JAVA_HOME` @@ -107,6 +115,7 @@ echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR +echo Using CATALINA_LOG:$CATALINA_LOG echo Using JAVA_HOME: $JAVA_HOME if [ $1 = jpda ] ; then @@ -197,7 +206,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ @@ -205,7 +214,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 fi elif [ $1 = stop ] ; then -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Idea for dtomcat4 script/conf in webapp.rpm
What do you think of adding a conf variable that allow one to set the location of catalina.out thats independent of $CATALINA_BASE? Something like $CATALINA_LOGDIR? -Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]