Changing the install owner for a root owned Data Collector installation
search cancel

Changing the install owner for a root owned Data Collector installation


Article ID: 225657


Updated On:


CA Performance Management - Usage and Administration DX NetOps


Can I change the owner of the files under /opt/CAPM/IMDataCollector to a service account? We don't have root access to the servers unless requested.

How to change the owner of a Data Collector installation from a root user to a non-root user?


All supported DX NetOps Performance Management releases


Installed as root user but root user access was revoked and requires special permission on a case by case basis.


Before changing the install owner to a non-root sudo-root user, it is required that the new user be properly configured to manage the installation. The steps to configure the user for proper sudo rights access are found on the Prepare to Install the Data Collectors documentation page.

The recommended method of changing the Data Collector (DC) install owner is to get the DCM_ID for the existing DC and re-install the DC using the existing DCM_ID value. Follow the Update the Data Collector documentation for complete steps.

If re-install is not an option these are the manual steps required. Ensure the DCM_ID is set aside for re-use if anything goes wrong. If anything does go wrong, use the method detailed above to resolve the issue.

Default paths used where shown.

  1. Stop all services (dcmd, activemq)
  2. Run the following:
    • chown -R <NewUserName>.<Group> /opt/IMDataCollector
  3. Run the following:
    • chown -R root.root /opt/IMDataCollector/ICMPD  (MUST be owned by root to run correctly, no other choice available)
  4. Edit the /opt/DCM.cfg file.
    • Change DCM_USER=root to DCM_USER=NewUserName
  5. Edit the /opt/IMDataCollector/scripts/activemq file
    • Find any comparison or command with "root" and change to "NewUserName"
  6. Edit the /etc/systemd/system/activemq.service file.
    1. Find the "[Service]" section.
    2. Add the following line with the new user if not present.
      • User=NewUserName
    3. If the User line is already present simply change the user name to the NewUserName.
  7. Restart all services.