CP Linux - How to change the location of the CP_TEMP_FOLDER

CP Linux - How to change the location of the CP_TEMP_FOLDER

85
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:02 PM


Objective


The CP uses a temp folder to prepare metadata. this folder is by default created in the /tmp folder of the system, as in:
/tmp/CP_TEMP_FOLDER

In some cases, organizational policies require the /tmp folder to get cleared periodically, causing the CP to not function (following the deletion of the required folder CP_TEMP_FOLDER)

This article demonstrates how the CP can be directed to create the CP_TEMP_FOLDER in a location other than /tmp


Environment


12.1;12.4;12.6 Privileged Access Manager (PAM, self-hosted) Credential Provider

Procedure


  1. Delete the folder /tmp/CP_TEMP_FOLDER
  2. Make a new temporary folder to have the CP_TEMP_FOLDER created in, for example /newTemp
  3. Grant the folder the required permissions:
    • chmod 733 /newTemp
  4. Set a new environment variable for AIM_TEMPFOLDER to the newly created directory:
    • export AIM_TEMP_FOLDER=/newTemp
  5. Add the environment variable declaration to the CP service script:
    • Open the file /etc/init.d/aimprv
    • Under the start function, immediately below the opening curly bracket of the start function, add the same export command from above (step 4), it should look like this:
    • image.png
    • Save the file and exit
  6. Amend the /etc/profile, add the new AIM_TEMP_FOLDER location to the last line of the file:
    export AIM_TEMP_FOLDER=/newTemp
    This ensures the variable is preserved after restarting the OS.
    1. Restart the CP service:
      • service aimprv restart
    2. A new CP_TEMP_FOLDER folder will be created under /newTemp/ with all the correct permissions and content.
      • Observe that the CP_TEMP_FOLDER folder is not getting re-created under /tmp/ anymore
    3. Perform some test CP calls to ensure everything is working fine.


    Actions
    • Print
    • Copy Link

      https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001FoHCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail