000034862 - Executing the RSA Identity Governance and Lifecycle patch.sh script fails with "No such file or directory" error

Document created by RSA Customer Support Employee on Feb 24, 2017Last modified by RSA Customer Support on Jul 22, 2019
Version 3Show Document
  • View in full screen mode

Article Content

Article Number000034862
Applies ToRSA Product Set: Identity Governance & Lifecycle
RSA Version/Condition: 7.x
IssueWhen attempting to run the patch.sh script for an RSA Identity Governance and Lifecycle 7.x patch, it fails with the following error:

test@acm-701:/> su root
Password: <enter root password>
acm-701:/ # cd /home/oracle/Aveksa_7.0.1_P02/
acm-701:/home/oracle/Aveksa_7.0.1_P02 # sh patch.sh
patch.sh: line 18: /archive/wildfly_deployment.properties: No such file or directory

Note that the line number displayed in the error message will vary depending on the product version and patch number.
CauseThis issue occurs if the environment for the root user does not contain a valid value for the environment variable $AVEKSA_HOME.   

The su root command inherits the Unix shell environment variables of the logged in user and does not set them to the root user.

test@acm-701:/> su root

The sudo su command does not carry over environment variables for the logged in user.  So, if you login with another Aveksa user, e.g. oracle, that has environment variables set, then you use just sudo su to move to root, the root user will not inherit the necessary environment variables required by patch.sh.

test@acm-701:/> sudo su
ResolutionIn order to run the patch.sh script as root user with the environment set correctly, either:
  • use the su command with the - (dash) parameter.

test@acm-701:/> su - root

  • or, if you are switching to the root user from another Aveksa user (e.g. oracle or admin) that has the required environment variables set, you can use the -E switch on the sudo command to ensure the Aveksa environment variables are available for the root user as well. 

test@acm-701:/> sudo -E su
NotesAlternatively, you also may be able to use the Unix sudo command with the -i option to accomplish the same thing.  The success of the sudo command however, depends on how the sudo permissions are set and may not work for all users. 

test@acm-701:/> sudo -u root -i