How to Change the Datameer Service User

Goal 

The Datameer service user is the account that starts the application. This article is aimed to describe the process you should follow in case it's required to change service user for Datameer.

Learn

According to the Installation Guide, the Datameer installation folder and all underlying files should be owned by a user who runs the application. In case any related folders (e.g. logs, cache, tmp) have been configured outside of the installation directory, the Datameer service account should own them as well.

Related KB article - Datameer Launched Under Root or Another Incorrect User

There is an option to allow the Datameer service to be started under a specific account. To enable this feature, it is required to set the DAS_USER variable in the <Datameer installation folder>/etc/das-env.sh file (Please find file snippet below) and restart the application.

# The user that the application should be started at. It is recommended to uncomment it and 
# set it to a specific user of your choice
export DAS_USER=<Datameer service user>

When this option is enabled and you try to start Datameer under a different user, the error message below will be thrown:

Application can only be started as user <user name>

In case it is required to change the Datameer service user, the next steps should be performed.

  • Log in under the current Datameer user.
  • Stop the application and ensure that it has been stopped (no Datameer processes are running).
  • Set the variable's DAS_USER value (if configured) in the etc/das-env.sh file to a new service account.
  • Change the Datameer file and folders ownership to the new service account.
    chown -R <new service user>:<usergroup> /<Datameer installation folder>
  • Change ownership of any other Datameer related folder, in case they are configured outside of the installation directory. For example:
    chown -R <new service user>:<usergroup> /var/log/datameer
    chown -R <new service user>:<usergroup> /var/cache/datameer
  • Start the Datameer service under the new service account.

Note! In case Datameer is connected to a Hadoop cluster and Impersonation is being used, you should re-configure the file permissions accordingly. Please refer to the appropriate sections of the guides below for further reference.


It is important to keep in mind that the Datameer Product ID, which the current license key is based on, depends on a service user and server software. A change of the Datameer service user will lead to the generation of a new Product ID and it would be required to obtain a new license file.