Symptoms
-
On a Plesk server Composer was added to the chroot environment.
-
Execution of composer from chroot environment fails with the following error:
curl error 77 while downloading https://repo.packagist.org/packages.json: Problem with the SSL CA cert (path? access rights?)
Cause
Certificates are missing in the chroot environment.
Resolution
1. Connect to a Plesk server via SSH.
2. Download the configuration script from the article to add programs to a chrooted shell environment template. Use two commands from step 2 of the 'Answer' section of the article.
3. Execute two commands below to add the required files to chroot template:
# cp -a /etc/pki /var/www/vhosts/chroot/etc/
# cp -a /etc/ssl /var/www/vhosts/chroot/etc/
Aditional steps for Cloudlinux OS:
# cp -a /lib64/libsoftokn3.so /var/www/vhosts/chroot/lib64/libsoftokn3.so
# cp -a /lib64/libnsssysinit.so /var/www/vhosts/chroot/lib64/libnsssysinit.so
# cp -a /lib64/libnsspem.so /var/www/vhosts/chroot/lib64/libnsspem.so
4. Apply the chroot template to the domain:
# ./update-chroot.sh --apply all