If you encounter
Errno 13: Permission Denied, this typically indicates a missing executable permission on the file or script.
$ drush @mysitegroup.dev status 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/mysitegroupdev/vendor/bin/drush (errno 13) Permission denied
This error tends to be more prevalent in Windows.
Check the permissions of the file to confirm it is executable. If it's not executable, you will need to modify the file in your repository, add executable privilege to the file, then commit and push to the cloud.
Drush missing from composer.json
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