Articles in this section

Git Deployment actions in Plesk are not executed: application_name:command not found

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • A Bash script configured in the Git Additional Deployment actions fails to execute with a not found error:

    application_name:command not found

  • The commands or bash script set under Domains > example.com > Git > Repository Settings > Deploy actions uses absolute paths. For example: /var/www/vhost/example.com/git/script.sh

  • The SSH Access Type is set to Forbidden or /bin/bash chrooted) under Domains > example.com > Hosting & DNS > Hosting.

Cause

The domain is configured to execute the Git additional deployment actions on a chroot environment while using absolute instead of relative paths.

Resolution

Apply one of the following solutions:

Continue to run deployment actions under chroot environment (Recommended)
  1. Log into Plesk

  2. Go to Domains > example.com > Git > Repository Settings (icon)

  3. Change all absolute paths under Deploy actions for relative paths e.g. For an script located in /var/www/vhost/example.com/git/script.sh set the path as /git/script.sh

    Note: All the commands included inside the script file need to use the relative path.

  4. In case the Deploy actions or the script requires to run commands other than basic ones (less, tar, zip) by default these will need to be added into the chrooted shell environment template

Run the deployment actions without restrictions
  1. Log into Plesk

  2. Go to Domains > example.com > Hosting & DNS > Hosting

  3. Change the SSH Access Type to /bin/bash

    Warning: The user will obtain all access as an ordinary user, including access to /bin, /user etc., as well as to run any application.

Additional information

What is the difference between options 'Access to the server over SSH' parameter in Plesk?

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.