I have installed PhpStorm into /opt on my Ubuntu 12.04 system. When I attach the command-line tool to my project drush living in /usr/bin/drush symbolically linked to ../share/php/drush/drush.php*
I e terrors when trying to dl into my project. My projects live in /var/www/projectname. How do I attach that specific mapping for running my drush command. The error shown reveals that drush is trying to download the module into /opt/phpstorm/bin. Or is it that it is trying to write something into the bin directory.
drush dl generate_errors
Directory /opt/PhpStorm-133.51/bin exists, but is not writable. [error]
Please check directory permissions.
Project generate_errors (7.x-1.1) could not be downloaded to [error]
Process finished with exit code 1 at 02:09:22.
Execution time: 13,316 ms.
So I decided to chown the directory with my username and the result is that drush downloads the module into home/myname directory instead of where the Project lives
> /usr/bin/drush dl admin_menu
Project admin_menu (7.x-3.0-rc4) downloaded to [success]
Project admin_menu contains 3 modules: admin_devel, admin_menu_toolbar, admin_menu.
Process finished with exit code 0 at 08:21:55.
Execution time: 2,923 ms.