When verifying a new platform, provision tries to change the permissions of drushrc.php to a writable state before actually creating it. So it throws an error and then continues on to create it and set the permissions back to 400:
Generating drushrc.php file
Could not change permissions of drushrc.php to 384 (chmod to 600 failed on /var/aegir/drupal-6.13/drushrc.php)
Drushrc file (/var/aegir/drupal-6.13/drushrc.php) was written successfully
Changed permissions of drushrc.php to 0400
This is per _provision_generate_config() in provision.drush.inc:
function _provision_generate_config() {
drush_log(dt("Generating drushrc.php file"));
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0600,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
provision_save_platform_data();
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0400,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
return TRUE;
}
On a re-verify of a platform, it is ok, because it finds the file to chmod first before writing to it.
I'll have a fix shortly that uses provision_exists($path) to wrap it in a conditional and only try and change the permissions of it to 600 if it already exists. Everything else stays the same: file is written as normal, and then changed back to 400.
function _provision_generate_config() {
$exists = provision_path_exists(drush_get_option('docroot_path') . '/drushrc.php');
if ($exists) {
drush_log(dt("Found existing drushrc.php file"));
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0600,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
}
else {
drush_log(dt("Generating drushrc.php file"));
}
provision_save_platform_data();
provision_path("chmod", drush_get_option('docroot_path') . '/drushrc.php', 0400,
dt('Changed permissions of drushrc.php to @confirm'),
dt('Could not change permissions of drushrc.php to @confirm'));
return TRUE;
}
Comment | File | Size | Author |
---|---|---|---|
#1 | 565012.patch | 1.38 KB | mig5 |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedAttached is a patch.
Expected behaviour in task output:
On verifying a new platform
On re-verifying an existing platform
Comment #2
acworks as advertised
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedFixed in head. Thanks