Symptoms

Task to install application fails with error:

[APSC] REST Application returns error code=500 type=Exception: file_put_contents(/var/www/html/scripts/certificate.pem): failed to open stream: Permission denied at /usr/share/aps/php/aps/2/types.php:215.

Cause

POA sends a certificate to endpoint but it cannot be stored because webserver does not have write permissions on the folder where endpoint scripts are stored.

Resolution

Assuming endpoint scripts are stored in /var/www/html/endpoint and webserver engine is Apache:

chown -R apache:apache /var/www/html/endpoint

See this KB for best practices in on how to configure endpoint.

Internal content