Can the provider be configured to use a different temp directory?

Can the provider be configured to use a different temp directory?

81
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 13:02 PM


Objective


Some implementations of Apache and other software packages may use a different temp directory than what the provider expects. This process describes modifying configurations so that the provider will use the same temp directory as the application making the call.

Environment


v9.0;v9.1;v9.2;9.3;9.5;9.6;9.7;9.8;9.9;9.9.5;9.10;10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6

Procedure


1. Set a baseline
a. Delete AIM_TEMP_FOLDER configuration if there is any
b. Send a CLI request and make sure it finishes successfully

2. Change CP AIM_TEMP_FOLDER
a. Locate where the aimprv script is located
find / -name aimprv

b. Edit the aimprv script to export a new path for AIM_TEMP_FOLDER under the Start() function (making sure to use a path other than /tmp)
export AIM_TEMP_FOLDER=/newTemp

c. Send the same CLI request as 1.b -  it should fail with an error referencing the new temp folder path.

ERROR: The lock file (/newTemp/AIM55594) couldn't be opened, Error code: 2.

 


3. Change CLI AIM_TEMP_FOLDER
a. Create /newTemp
mkdir -p /newTemp

b. Change ownership of the directory to the user calling the provider (the "owner" of the CGI/httpd output).
chown -R apache:apache /newTemp
c. Ensure that the user calling the provider (i.e. "apache") can create a file within /newTemp and adjust permissions as necessary.
d. Export the same value from step 2b to AIM_TEMP_FOLDER in the CLI shell
export AIM_TEMP_FOLDER=/newTemp
Note: It may be required to add this export line to '~/.profile'.
e. Send the same CLI request as 1.b - it should finish successfully
f. If it does not finish successfully, confirm which user is running the provider service
ps aux | egrep '(aimprv)'

g. Confirm that this user can echo the $AIM_TEMP_FOLDER environment variable
For example, if aimprv was ran by 'ubuntu':
 

sudo -u ubuntu echo $AIM_TEMP_FOLDER

h. If the echo comes back blank this will need to be resolved by a Unix admin, as this user needs to know what the correct path is for $AIM_TEMP_FOLDER.


4. Change the application AIM_TEMP_FOLDER
a. In the bash CGI script, add AIM_TEMP_FOLDER
export AIM_TEMP_FOLDER=/newTemp

b. To ensure that the AIM_TEMP_FOLDER variable is available for each login session,
add the following two lines to /etc/profile.d/sh.local

# for Idira AIM (APV) usage for CGI
export AIM_TEMP_FOLDER=/newTemp


Actions
  • Print
  • Copy Link

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