Red Hat Bugzilla – Bug 1013501
Drush fails as regular user (permission denied)
Last modified: 2013-12-24 12:57:32 EST
Description of problem:
Permission denied when run as regular user; tries to write to /usr/share.
Version-Release number of selected component (if applicable): 5.9
When I run "drush <some-command>" on a Drupal website somewhere below my home folder it complains about not being able to write to /usr/share/pear/drush.
Steps to Reproduce:
1. sudo yum install -y php-drush-drush
3. drush status
[claus@localhost]$ drush status
Directory /usr/share/pear/drush exists, but is not writable. Please [error]
check directory permissions.
A message that the current directory is not a Drupal site.
Reporting this bug as suggested at https://ask.fedoraproject.org/question/33217/drush-fails-as-regular-user-permission-denied/ , where a workaround is described.
Fixing https://bugzilla.redhat.com/show_bug.cgi?id=997843 would probably fix this one too.
This problem is being caused because the drush RPM does not include "/usr/share/pear/drush/lib/", which drush requires (but doesn't require to be writeable), and a non-root user cannot create that folder
"/usr/share/pear/drush/lib/" should be included in the drush RPM.
When I created that folder (as root), my non-root user was able to run drush.
Claus & John -- Would two like to have a quick fix for this (comment #1) or would you like to wait until I have time to get the pkg updated (bug #997843). I could do the quick fix tomorrow, but the update will take me a little longer.
This is not urgent for me. I am working with the upstream 6.0 release at the moment.
I've manually fixed this by creating "/usr/share/pear/drush/lib" on my machines with drush, so, assuming bug #997843 will be available for RHEL6 (via EPEL), then I'm fine with waiting for version 6 as well.
php-drush-drush-6.2.0-1.fc18 has been submitted as an update for Fedora 18.
php-drush-drush-6.2.0-1.fc19 has been submitted as an update for Fedora 19.
php-drush-drush-6.2.0-1.fc20 has been submitted as an update for Fedora 20.
php-drush-drush-6.2.0-1.el6 has been submitted as an update for Fedora EPEL 6.
php-drush-drush-6.2.0-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
php-drush-drush-6.2.0-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
php-drush-drush-6.2.0-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
php-drush-drush-6.2.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.