2

I changed the files and folder permissions with the following commands.

find . -type f -print0 | xargs -0 chmod 0644
find . -type d -print0 | xargs -0 chmod 0755

I can't run Drush commands anymore, unless I change file permissions back to 777. When I run drush cr, for example, I get this error.

PHP Warning: pcntl_exec(): Error has occurred: (errno 13) Permission denied in /usr/local/bin/drush-8/vendor/drush/drush/includes/startup.inc on line 415
Error has occurred executing the Drush script found at /data/websites/virtualmax.ca/public_html/vendor/drush/drush/drush (errno 13) Permission denied

Is there a certain permission required to run Drush commands?

1 Answer 1

3

Apparently, you have two Drush instances installed, as you can see in your error log, it tries to run the global Drush which is located at /usr/local/bin/drush-8/vendor/drush/drush first

the reason that you cannot run Drush commands locally after file permission changes is that it's not executable, try this in your installation root:

sudo chmod +x vendor/drush/drush/drush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.