Problem:
A UNIX/LINUX system agent job submitted as non-root user report: Can't change to working directory '/opt/CA/ESP_System_Agent_R7': error 13 (Permission denied) or Can't change to working directory '/opt/CA/WA_Agent_R11_3_4': error 13 (Permission denied)
Environment:
When a system agent is running as root, and a job is submitted as non-root user, the job may not complete or report an error like this:
Can't change to working directory '/opt/CA/ESP_System_Agent_R7': error 13 (Permission denied).
The same job will complete successfully when the job is submitted as root. The problem may be related to permissions of the agent install directory or a directories above it. If directory permission is something like the following, then the agent may not be able to execute jobs submitted as non-root user(s).
drwxrwxr-- 9 root root 4096 Jan 2 14:03 ESP_System_Agent_R7
drwxrwxr-- 10 root root 4096 Jan 2 14:03 /opt/CA/ESP_System_Agent_R7
Cause:
The 'other permission octal' in the above is missing execute permission.
Resolution:
The execute permission should be added so that agent can execute a job as non-root user (see below).
drwxrwxr-x 9 root root 4096 Jan 2 14:03 ESP_System_Agent_R7
drwxrwxr-x 9 root root 4096 Jan 2 14:03 /opt/CA/ESP_System_Agent_R7