Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-2173

Linux binary installation fails because RUN_AS_GROUP not used in chown commands

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M20
    • Fix Version/s: 2.0.0-M24
    • Component/s: None
    • Labels:
      None

      Description

      The change implemented in DIRSERVER-1995 only works for installs on Linux hosts in which $RUN_AS_USER is also a valid group.

      The following trace shows the case of how the Linux binary installation of ApacheDS fails when the $RUN_AS_USER is not also an existing group:

      Do you agree to the above license terms? [yes or no]
      yes
      Unpacking the installer...
      Extracting the installer...
      Where do you want to install ApacheDS? [Default: /opt/apacheds-2.0.0-M20]

      Where do you want to install ApacheDS instances? [Default: /var/lib/apacheds-2.0.0-M20]

      What name do you want for the default instance? [Default: default]

      Where do you want to install the startup script? [Default: /etc/init.d]

      Which user do you want to run the server with (if not already existing, the specified user will be created)? [Default: apacheds]

      Which group do you want to run the server with (if not already existing, the specified group will be created)? [Default: apacheds]
      servers
      Installing...
      chown: invalid group: `apacheds:apacheds'
      chown: invalid group: `apacheds:apacheds'
      chown: invalid group: `apacheds:apacheds'
      An error occurred when installing ApacheDS.
      ApacheDS installation failed.

      In this case 'apacheds' is not a valid group on the Linux host so the install "fails". But $RUN_AS_GROUP is set to 'servers' which is a valid group on the host so the install should not fail. The sh/install.sh script in the binary release needs to be updated so that the chown commands use $RUN_AS_USER:$RUN_AS_GROUP instead of the current $RUN_AS_USER:$RUN_AS_USER:

      chown -R $RUN_AS_USER:$RUN_AS_GROUP $APACHEDS_HOME_DIRECTORY
      chown -R $RUN_AS_USER:$RUN_AS_GROUP $INSTANCES_HOME_DIRECTORY
      chown $RUN_AS_USER:$RUN_AS_GROUP $STARTUP_SCRIPT_DIRECTORY/apacheds-$APACHEDS_VERSION-$DEFAULT_INSTANCE_NAME

        Activity

        Hide
        seelmann Stefan Seelmann added a comment -
        Show
        seelmann Stefan Seelmann added a comment - Thanks for the report. FIxed here: http://svn.apache.org/viewvc?rev=1770584&view=rev Added installer test: http://svn.apache.org/viewvc?rev=1770585&view=rev
        Hide
        cthain Chris Thain added a comment -

        Sorry, the reference issue in the description is wrong but I can't edit it. The correct reference is DIRSERVER-1911.

        Show
        cthain Chris Thain added a comment - Sorry, the reference issue in the description is wrong but I can't edit it. The correct reference is DIRSERVER-1911 .

          People

          • Assignee:
            seelmann Stefan Seelmann
            Reporter:
            cthain Chris Thain
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development