As with Drupal core, those files should just be skipped:

/var/aegir/prod-drupal-6.16-1.4/sites/anarcat.koumbit.org/modules$ drush dl decisions
require_once(/var/aegir/prod-drupal-6.16-1.4/drushrc.php): failed to [warning]
open stream: Permission denied
Fatal error: require_once(): Failed opening required '/var/aegir/prod-drupal-6.16-1.4/drushrc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/aegir/drush/includes/context.inc on line 146
Drush command could not be completed.                                [error]

I have a attached a simple patch which gracefully handles those scenarios.

CommentFileSizeAuthor
#1 handle-permission-denied.patch1.02 KBanarcat

Comments

anarcat’s picture

StatusFileSize
new1.02 KB

I swear i included that patch on the first submission...

Oh, and there are other places in drush where this isn't quite handled gracefully, particularly the settings.php stuff, but that's another issue.

moshe weitzman’s picture

Seems OK to me. Any objections?

greg.1.anderson’s picture

Looks good by inspection; haven't tried...

moshe weitzman’s picture

Title: drush should die when it can't load a drushrc on a permission denied » drush should warn when it can't load a drushrc on a permission denied
Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.