RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 695284 - catalina.out path hard-coded in /usr/sbin/tomcat6
Summary: catalina.out path hard-coded in /usr/sbin/tomcat6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tomcat6
Version: 6.0
Hardware: noarch
OS: Linux
high
low
Target Milestone: rc
: ---
Assignee: David Knox
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 697504 (view as bug list)
Depends On:
Blocks: 701759
TreeView+ depends on / blocked
 
Reported: 2011-04-11 10:22 UTC by Jeremy Sowden
Modified: 2015-11-02 00:16 UTC (History)
9 users (show)

Fixed In Version: tomcat6-6.0.24-33.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 701759 (view as bug list)
Environment:
Last Closed: 2011-05-19 10:58:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch for initscript (3.54 KB, patch)
2011-04-28 18:01 UTC, David Knox
no flags Details | Diff
proposed patch for wrapper (/usr/sbin/tomcat6) (1.41 KB, patch)
2011-04-28 18:01 UTC, David Knox
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0791 0 normal SHIPPED_LIVE Moderate: tomcat6 security and bug fix update 2011-05-19 10:58:07 UTC

Description Jeremy Sowden 2011-04-11 10:22:34 UTC
Description of problem:

  In /usr/sbin/tomcat6 the output from org.apache.catalina.startup.Bootstrap is
  redirected to catalina.out.  When $1 is "start," the path is
  ${CATALINA_BASE}/logs/catalina.out; when $1 is "start-security" or "stop." the
  path is /var/log/tomcat6/catalina.out.

Version-Release number of selected component (if applicable):

  tomcat6-6.0.24-24.el6_0.noarch

How reproducible:

  Start and stop tomcat as another user than tomcat with an alternative $CATALINA_BASE.

Steps to Reproduce:
1. Clone $CATALINA_BASE:

  ( cd /usr/share && tar chf - tomcat6 ) | ( cd /tmp && tar xf - )

2. Start tomcat:

  CATALINA_BASE=/tmp/tomcat6 /usr/sbin/tomcat6 start

3. Stop tomcat:

  CATALINA_BASE=/tmp/tomcat6 /usr/sbin/tomcat6 stop

Actual results:

  Failed attempt to append output to /var/log/tomcat6/catalina.out:

 /usr/sbin/tomcat6: line 62: /var/log/tomcat6/catalina.out: Permission denied

Expected results:

  Sueccesful attempt to append output to $CATALINA_BASE/catalina.out

Additional info:

Comment 2 David Knox 2011-04-12 18:31:55 UTC
Fixed in tomcat6-6.0.24-26.el6_0

Comment 8 David Knox 2011-04-28 18:01:02 UTC
Created attachment 495622 [details]
proposed patch for initscript

Comment 9 David Knox 2011-04-28 18:01:35 UTC
Created attachment 495623 [details]
proposed patch for wrapper (/usr/sbin/tomcat6)

Comment 10 David Knox 2011-04-28 18:06:21 UTC
makeHomeDir should create and link the log directory when ${CATALINA_HOME} directory does not exist. I found makeHomeDir does indeed create /var/log/${NAME} but doesn't link ${CATALINA_HOME}/logs.

Comment 11 David Knox 2011-04-28 20:01:46 UTC
*** Bug 697504 has been marked as a duplicate of this bug. ***

Comment 12 David Knox 2011-04-28 22:25:37 UTC
The wrapper now takes two arguments. The second argument is ${TOMCAT_LOG}. Changes were made to the zstream earlier and have been made in tomcat6-6.0.24-33.el6.

Comment 13 John Dennis 2011-04-28 23:20:03 UTC
Hi David:

I think the proposed init patch has the same issues discussed in bug 697504.

Good catch on the makeHomeDir function. I took a quick look at makeHomeDir and
my first impression is it seems a bit dubious, possibly a relic from systems
which are not RPM based. I'll have to spend a bit more time understanding in
detail what it's attempting to accomplish. I'll follow up tomorrow.

Also, just noticed another problem (at least in the f15 branch) the login shell
is /bin/sh not /sbin/nologin despite the comment for 0:6.0.30-6. (Yes I realize this is a RHEL bz)

Comment 14 Jan Ščotka 2011-04-29 06:34:15 UTC
Hi,
the bug with login shell is solved by: 678671 
and I've tested it earlier, now I've tests it with .30 and seems that no regression back:
tomcat:x:91:91:Apache Tomcat:/usr/share/tomcat6:/sbin/nologin
From my point of view, nologin shell is okay
   Honza

Comment 16 John Dennis 2011-04-30 14:32:26 UTC
re comment #14

I committed the sin of making a comment about another distribution in this bug, sorry if that was confusing :-) The login shell bug is now filed against F15 in bug 701038

Comment 30 John Dennis 2011-05-03 19:44:32 UTC
re comment #27

Thank you David, sounds good.

Comment 34 errata-xmlrpc 2011-05-19 10:58:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0791.html


Note You need to log in before you can comment on or make changes to this bug.