1

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


 $aliases['default'] = array(
      'root' => '/var/www/d7',
      'uri' => 'drupal.dev',
    'os' => 'Ubuntu',
    'path-aliases' => array(
    '%drush' => '/usr/share/php/drush',
      '%drush-script' => '/usr/bin/drush',
      '%dump-dir' => '/tmp',
      '%files' => 'sites/default/files',
      '%private' => '/var/www/html/private',
     ),
    'databases' =>
      array (
        'default' =>
        array (
          'default' =>
          array (
            'driver' => 'mysql',
            'username' => '[placeholder]',
            'password' => '[placeholder]',
            'port' => '',
            'host' => 'localhost',
            'database' => '[placeholder]',
          ),
       ),
     ),
     'variables' => array(
        'site_name' => 'Drupal',
      ),
     'command-specific' => array (
 'sql-sync' => array (
         'no-cache' => TRUE,
       ),
     ),
  );
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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