linux agents unavailable after upgrading agents to v6.6

Document ID : KB000108018
Last Modified Date : 26/07/2018
Show Technical Document Details
After upgrading agents on some of our linux systems we are seeing that the agents are unavailable.
CA Release Automation
AIX 6.x
Logging into the linux system, changing directory to the where the CA Release Automation Agent is installed (by default: /opt/CA/ReleaseAutomationAgent) and running an "ls -la" revealed that the agent was installed as root with a very restricted set of permissions. The restricted set of permissions is because the root user's umask is set to 0177. After the agent install/upgrade it changed the permissions to this restricted set which prevents the agent from starting. For example, running "./ status" 

would return the following errors:
/opt/CA/ReleaseAutomationAgent/bin/wrapper-aix-ppc-64 Found but not executable
/opt/CA/ReleaseAutomationAgent/bin/wrapper-aix-ppc-32 Found but not executable
Unable to locate any of the following binaries:
/opt/CA/ReleaseAutomationAgent/bin/wrapper-aix-ppc-64 Found but not executable
/opt/CA/ReleaseAutomationAgent/bin/wrapper-aix-ppc-32 Found but not executable

To prevent this issue from occurring on agent machines that haven't been upgraded yet, temporarily set the root users umask to 022 before the upgrade. Then have it changed back to its expected value after the upgrade. Of course, this only applies if the agent is installed as root. The upgrade will run as whatever user the agent is installed as. 

There are a few ways to solve this after it is already a problem:
  1. Uninstall (/opt/CA/ReleaseAutomationAgent/uninstall) the agent. Then reinstall the agent with a umask of 022. 
  2. Recursively set permissions to 755 or 750. Whether you use 755 or 750 will depend on whether or not you use the product's user impersonation features. If so and the user is in the owning group then you can set it to 750. If you use the feature and the user you impersonate is not in the owning group then it should be set to 755.

It is not uncommon to install the CA Release Automation Agent as a non-root user. If you need to install the agent as a non-root user then details on how to do this are available here:
Install Unix / Linux Agent to Run as Non-Root User

Installing the agent as a non-root user after the agent has been installed and had deployments run against it might cause unexpected problems. This is because the deployment workflows might do things that need certain privileges. The deployment workflows are custom workflows based on your organizations (application teams) needs. Suddenly changing the user used to perform all those tasks may incur some downtime while figuring out how to get it accomplished with a non-root user.