Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionEtienne Carrière
2013-02-25 18:46:50 UTC
Description of problem:
The /etc/init.d/tomcat script is not constructed to handle a user with a name that does not correspond to an existing group
Version-Release number of selected component (if applicable):
How reproducible: Always
Steps to Reproduce:
1. Create a user (such as "test") on a system where the group "test" does not exist. For example, create with test:test1 configuration
2. Change the /etc/sysconfig/tomcat with TOMCAT_USER=test
3. Start /etc/init.d/tomcat6
Actual results:
The chown of the CATALINA_PID file failed
The tomcat can't write to the CATALINA_PID file
It is impossible to stop tomcat with /etc/init.d/tomcat stop
Expected results:
The chown is done correctly and the start/stop of tomcat is operationnal
Additional info:
I propose to :
- Add a variable TOMCAT_GROUP to
/etc/tomcat6/tomcat6
/etc/sysconfig/tomcat6
- Modify /etc/init.d/tomcat6 with the following patch (attached)
With this modification, we are retro-compatible with the previous behaviour
Comment 5RHEL Program Management
2013-03-04 06:48:10 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
FAILED QA on tomcat6-6.0.24-59.el6
(1) A similar patch from the ont in comment 2 is applied, however, there is no
TOMCAT_GROUP variable in /etc/sysconfig/tomcat6 or /etc/tomcat6/tomcat6.conf.
User still can add the variable himself if wishes to change the name of
tomcat user's primary group. However, I consider fix for this bug to be
incomplete.
(2) Why are we defining a variable for something that can be computed? Doesn't it
bring more possibilities of error? I propose to replace:
# Define the tomcat group
TOMCAT_GROUP="${TOMCAT_GROUP:-tomcat}"
in initscript with something like:
TOMCAT_GROUP="$(id -gn $TOMCAT_USER)"
This way there is no need to configure the variable in /etc/sysconfig/tomcat6
or /etc/tomcat6/tomcat6.conf
TOMCAT_GROUP now appears in sysconfig/tomcat6 and <confdir>/tomcat6.conf to stay with convention with the existing pattern. The appearance in the initscript is a safety net in case TOMCAT_USER and TOMCAT_GROUP is not defined appropriately in the config files.
The definition in sysconfig/tomcat6 is commented as is TOMCAT_USER. Customers running individual tomcat instances using a different user name and/or group should define TOMCAT_USER and TOMCAT_GROUP in sysconfig/tomcat6. The default is `id -gn $TOMCAT_USER`
TOMCAT_GROUP is defined in <confdir>/tomcat6.conf following convention. Customers running multiple instances using the same TOMCAT_USER and/or TOMCAT_GROUP should find the definitions in tomcat6.conf sufficient.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-1721.html