Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 915447
Summary: | Problem to start tomcat with a user whose group has a name different to the user | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Etienne Carrière <etienne.carriere> | ||||
Component: | tomcat6 | Assignee: | David Knox <dknox> | ||||
Status: | CLOSED ERRATA | QA Contact: | tomcat-qe | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.1 | CC: | aneelica, djorm, hajek, jclere, lnovich, luvilla, mhasko, rbiba, rhatlapa, tfonteyn, thoger | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | tomcat6-6.0.24-60.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1505762 (view as bug list) | Environment: | |||||
Last Closed: | 2013-11-21 23:50:47 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1505762, 1510896 | ||||||
Attachments: |
|
Description
Etienne Carrière
2013-02-25 18:46:50 UTC
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 Created attachment 702485 [details]
Patch
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. The fix has been applied and is ready to commit. Looks like we only need 6.5+. Simpler reproducer I've found: # groupmod -n test tomcat # service tomcat6 start ... 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 |