On Linux platforms, an ElectricCommander server installation has a server user and an agent user while a Commander agent-only install has an agent user only. These users own installation files and start Commander processes. For server installations, the server and agent user can be set to the same or different users. Users are normally set up during installation, but you may need to change the user sometime after installation. Use the following procedure to change a user.
- /etc/init.d/commanderMySQLWrapper stop
- /etc/init.d/commanderApache stop
- /etc/init.d/commanderAgent stop
- /etc/init.d/commanderServer stop
chown \-hR <server user>:<server group> <path to installation directory>
For example, if the installation is in /opt/electriccloud, the new server user is serverUser and the new server group is serverGroup, use:
chown \-hR serverUser:serverGroup /opt/electriccloud
For example: RUN_AS_USER=serverUser
4. In /etc/init.d/commanderMySQLWrapper, edit the line beginning with "setsid su" to contain the new server user name.
setsid su - serverUser \-c "/opt/electriccloud/electriccommander/mysql/commanderMySQL $*"
6. In the httpd.conf file located in the ElectricCommander install files in the apache/conf directory, change the User and Group to the new server user and group.
For example, if the installation is located in /opt/electriccloud/electriccommander, edit /opt/electriccloud/electriccommander/apache/conf/httpd.conf:
- change the ownership of agent.crt in the conf directory.
- chown agentUser:agentGroup /opt/electriccloud/electriccommander/conf/agent.crt
- change the ownership of agent.key in the conf directory.
- chown agentUser:agentGroup /opt/electriccloud/electriccommander/conf/agent.key
- change the ownership of the log/agent directory (and its contents)
- /etc/init.d/commanderAgent start
- /etc/init.d/commanderApache start
- /etc/init.d/commanderMySQLWrapper start
- /etc/init.d/commanderServer start
To change the agent user in an ElectricCommander agent-only installation, the easiest method is to uninstall and reinstall the agent with the new agent user and agent group names. Otherwise, the following procedure can be used:
chown \-hR <agent user>:<agent group> <path to installation directory>
For example, if the installation is in /opt/electriccloud, the new agent user is agentUser and the new agent group is agentGroup, use:
chown \-hR agentUser:agentGroup /opt/electriccloud