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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-M20
    • 2.0.0-M24
    • None
    • 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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: