search cancel

CA API Gateway Agent Permissions Issue


Article ID: 187325


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management




Here is why the installer APMIA fails on the APIGateway. It is due to the umask value for the root user on the Gateway. When the script runs, it updates entries in the files below and the file permissions change due to the umask. Because permissions deny the non-root user from accessing  the files, the install fails and roll back begins.


Good Install on another server:

      [[email protected] ~]# uname -a

      Linux myServer 2.6.32-642.6.1.el6.x86_64 #1 SMP Wed Oct 5 00:36:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

      [[email protected] apmia]# umask


      [[email protected] apmia]# for O in $(find . -user root); do ls -al $O; done

      -rw-r--r--. 1 root root 49961 ./core/config/IntroscopeAgent.profile

      -rwxr-xr-x. 1 root root 92396  ./bin/

      -rw-r--r--. 1 root root 26  ./bin/java_heap

      -rw-r--r--. 1 root root 12 ./bin/apmia.user

      -rw-r--r--. 1 root root 3777./conf/wrapper.conf



APIGateway (bad install):

      [[email protected] ~]# uname -a

      Linux localhost.localdomain #1 SMP... x86_64 x86_64 x86_64 GNU/Linux

      [[email protected] apmia]# umask


      [[email protected] apmia]# for O in $(find . -user root); do ls -al $O; done

      -rwx------ 1 root root 92386 ./bin/

      -rw------- 1 root root 3777  ./conf/wrapper.conf

      -rw------- 1 root root 50438  ./core/config/IntroscopeAgent.profile




Release : 11.1.3

Component : APM Agents




      - Edit ./apmia/apim-pm-gw/

            + Line 190

              From: sh install

              To:  sh install user=$EPAGENT_USER

              Note: otherwise we are just calling the script and it would install as root. The problem comes in that the files and DB permissions updated by the script were created for the user we passed the script (or apmusr (default)). So monitoring some API components would fail.

            + Line 195

              From: APMIA_PID=$(cat bin/

              To:  APMIA_PID=$(cat bin/

      - Edit and add the below as line 1159:

            + Add: eval chown -R $change_user:$change_user $APMIA_HOME

              Note: Workaround for the unmask issue. This change is okay to keep, in the APMIA install scripts for any deployment.