This page provides instructions for changing the Controller owner.

You may need to change the user who is running the Controller services during a system migration or other event. 

The procedure varies based on whether you are using the Enterprise Console. 


In order to change the owner of the Controller, complete the following steps.

  1. Stop all running Controller services using the following command in the machine terminal.
    • ./controller.sh stop
  2. Change the username and user group of the Controller directory.
    • chown -R <New User>:<User Group> <Controller Folder>
  3. Update the new user in the db.cnf file located at Controller/db/db.cnf.
    •   user=<New User>
  4. Start the Controller.
    • ./controller.sh start

If you are not using the Enterprise Console 

  1. As the current user running the Controller services, shut down the Controller process:

    CONTROLLER_HOME_DIR/bin/controller.sh stop
    CODE
  2. Change the ownership (recursively) of the entire Controller directory to the new user. In this example, appdynamics:admin is the user:group, respectively:

    chown -R appdynamics:admin CONTROLLER_HOME_DIR/
    CODE
  3. If the Controller's data directory is outside of the root Controller's folder, then you must also change the owner of the database data files:

    chown -R appdynamics:admin .../data/
    CODE
  4. Change the user to the new username:

    CONTROLLER_HOME_DIR/db/db.cnf
    CODE
  5. Log in as the new user and start the Controller services:

    CONTROLLER_HOME_DIR/bin/controller.sh start
    CODE

If you are using the Enterprise Console 

  1. Remove the Controller from the Enterprise Console by de-selecting the Remove Binaries option; otherwise, the binaries will be removed from the disk. To remove the Controller without uninstalling the Controller:

    PLATFORM_HOME_DIR/bin/platform-admin.sh submit-job --service controller --job remove --args removeBinaries=false --skip-confirm
    CODE
  2. As the current user running the Controller services, shut down the Controller process.

    CONTROLLER_HOME_DIR/bin/controller.sh stop
    CODE
  3. Change the ownership (recursively) of the entire Controller directory to the new user. In this example, appdynamics:admin is the user:group, respectively:

    chown -R appdynamics:admin CONTROLLER_HOME_DIR/
    CODE
  4. If the Controller's data directory is outside of the root Controller's folder, then you must also change the owner of the database data files:

    chown -R appdynamics:admin .../data/
    CODE
  5. Change the user to the new username:

    CONTROLLER_HOME_DIR/db/db.cnf
    CODE
  6. Log in as the new user and start the Controller services:

    CONTROLLER_HOME_DIR/bin/controller.sh start
    CODE
  7. From the Enterprise Console, remove the hosts that were added:

    PLATFORM_HOME_DIR/bin/platform-admin.sh remove-dead-hosts --hosts $CONTROLLER_HOST --skip-confirm
    CODE
  8. Remove the credentials because the credentials are connected to the previous user.
  9. Add the credentials using the new user, and then add the host. 
  10. Perform a Discover and Upgrade for the Controller.
  11. (Optional) If you have installed the Linux services, then:
    1. Logged in as root, uninstall the services:

      HA/uninstall-init.sh
      CODE
    2. Logged in as root, install the services using either the -c or -s options:

      HA/install-init.sh
      CODE