I'm looking to drop the -a flag from the drush's rsync, but not sure what the best place for it as far Aegir is concerned. Would it be the sitename.alias.drushrc.php files in /var/aegir/.drush? Or should this change be configured in /var/aegir/drush/commands/core/rsync.core.inc ? Ideally, it would get set in once place and be effective for all sites, and without impact to other functionality.

The reason I am looking to drop -a flag is to not preserve file ownership when the files are pushed out to clustered web servers -- we keep running to weird file permission issues, when files have different ownership on the Aegir server than the target web servers.


1 Answer 1


I put this in my drushrc.php file to change the default rsync mode to -rlptz for all sites:

$command_specific['rsync'] = array('mode' => 'rlptz');

You could also put it in each site alias if you did not want the change to be affected on a global basis:

$aliases['mysite'] = array(
  'root' => '/path/to/drupal',
  'uri' => 'mysite.org',
  'command-specific' => array(
    'rsync' => array(
      'mode' => 'rlptvz',
    'sql-sync' => array(
      'mode' => 'rlptvz',
  • Thanks @greg_1_anderson. I have drushrc.php under platforms and hostmaster-6.x-1.6. Would this be the drushrc.php for hostmaster if this were to take effect for all sites?
    – KM.
    Dec 8, 2011 at 14:15
  • You can find the location that drush searches for drushrc.php in the README.txt file: drupalcode.org/project/drush.git/blob/HEAD:/examples/… Use /etc/drush for options for all sites and all users, or ~/.drush for all sites for the current user. If you place your config file in the Drupal root, or next to your settings.php file, then it will only be active when the --root option, or --root and --uri together are used to select that code base or site. The --config option can also be used to add more locations; I don't know if Aegir adds platforms or hostmaster. Dec 8, 2011 at 18:05
  • More succinctly: /etc/drush/drushrc.php or $HOME/.drush/drushrc.php would be good locations. Aegir may define other locations that are also good. Dec 8, 2011 at 18:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.