How to set proper permissions for drush rsync I have a weird problem here. When I use drush sync for my remote server, Drush changes permissions for the uploaded files to the name of the remote user for both the user and the group on the system.

The remote server is an Apache-FPM install where the name &amp; group of webroot files have to be owned by vu2003:vu2003. Is there a way to achieve this with the aliases.drushrc.php?

Here Is my aliases file:

$aliases['live'] = array(
    'uri' =&gt; 'pts1.tk',
    'root' =&gt; '/var/www/virtual/pts1.tk/htdocs',
    'remote-host' =&gt; 'pts1.tk',
    'remote-user' =&gt; 'publisher',
    'os' =&gt; 'Ubuntu',
    'path-aliases' =&gt; array(
    '%drush' =&gt; '/usr/share/php/drush',
      '%drush-script' =&gt; '/usr/bin/drush',
      '%dump-dir' =&gt; '/tmp',
      '%files' =&gt; 'sites/default/files',
      '%private' =&gt; '/var/www/virtual/pts1.tk/000_private',
     ),
    'databases' =&gt;
      array (
        'default' =&gt;
        array (
          'default' =&gt;
          array (
            'driver' =&gt; 'mysql',
            'username' =&gt; '[placeholder]',
            'password' =&gt; '[placeholder]',
            'port' =&gt; '',
            'host' =&gt; 'pts1.tk',
            'database' =&gt; '[placeholder]',
          ),
       ),
     ),
     'variables' =&gt; array(
        'site_name' =&gt; 'Drupal',
      ),
     'command-specific' =&gt; array (
       'sql-sync' =&gt; array (
         'no-cache' =&gt; TRUE,
       ),
     ),
  );


 $aliases['default'] = array(
      'root' =&gt; '/var/www/d7',
      'uri' =&gt; 'drupal.dev',
    'os' =&gt; 'Ubuntu',
    'path-aliases' =&gt; array(
    '%drush' =&gt; '/usr/share/php/drush',
      '%drush-script' =&gt; '/usr/bin/drush',
      '%dump-dir' =&gt; '/tmp',
      '%files' =&gt; 'sites/default/files',
      '%private' =&gt; '/var/www/html/private',
     ),
    'databases' =&gt;
      array (
        'default' =&gt;
        array (
          'default' =&gt;
          array (
            'driver' =&gt; 'mysql',
            'username' =&gt; '[placeholder]',
            'password' =&gt; '[placeholder]',
            'port' =&gt; '',
            'host' =&gt; 'localhost',
            'database' =&gt; '[placeholder]',
          ),
       ),
     ),
     'variables' =&gt; array(
        'site_name' =&gt; 'Drupal',
      ),
     'command-specific' =&gt; array (
 'sql-sync' =&gt; array (
         'no-cache' =&gt; TRUE,
       ),
     ),
  );
The easiest solution would be to set 'remote-user' => 'vu2003', and set up the ~/.ssh/authorized_keys for that user to allow the rsync to run.