This issue could be related to 2 reasons:
- Getting (errno 13), see example below.
- Or vendor/bin/drush is missing.
Example error (errno 13):
PHP Warning: pcntl_exec(): Error has occurred: (errno 13) Permission denied in /usr/local/drush8/vendor/drush/drush/includes/startup.inc on line 422 Error has occurred executing the Drush script found at /mnt/www/html/<site-env>/vendor/bin/drush (errno 13) Permission denied
This normally can happen if you are using Windows.
If drush is missing from composer.json, see the following option to fix this, do all these steps in your local machine:
- Run the following commands
composer config vendor-dir vendor composer require drush/drush
vendor/binstill does not contain a symlink to Drush, you can try regenerating the entire vendor directory again:
rm -rf vendor composer install
Alternatively, you can manually create the Drush symlink in
vendor/binas long as
vendor/drush/drush/drushhas already been installed using Composer:
cd vendor/bin ln -s drush ../drush/drush/drush