Drush: Permission denied outside htdocs I've been trying to solve this problem for hours now.

I successfully installed Drush locally and it works fine when I'm using it within XAMPP's htdocs folder. However, I want to move the Drupal folder to a virtual host outside htdocs. When I run drush inside the new folder, it says:

$ drush status

PHP Warning:  pcntl_exec(): Error has occurred: (errno 13) Permission denied in phar:///usr/local/bin/drush/includes/startup.inc on line 359

Warning: pcntl_exec(): Error has occurred: (errno 13) Permission denied in phar:///usr/local/bin/drush/includes/startup.inc on line 359
Error has occurred executing the Drush script found at /Users/ivan/drush
(errno 13) Permission denied


Tried to change folder owner to admin group, chmod -R 777 - nothing worked. I am running on OS X 10.11.6 and XAMPP 5.6.12.

Thank you for any help.
It seems you have two Drush installations - /Users/ivan/drush and /usr/local/bin/drush I'm guessing that /Users/ivan/drush isn't executable and hence causing the error. I suggest just removing /Users/ivan/drush.