Commit 18405d6e authored by bdragon's avatar bdragon Committed by helmo

Issue #2955675 by bdragon: chgrp during provision strips off setgid directory bit

parent bb6f11f4
......@@ -284,12 +284,6 @@ function _provision_drupal_create_directories($url = NULL) {
->succeed('Created <code>@path</code>')
->fail('Could not create <code>@path</code>', 'DRUSH_PERM_ERROR');
}
if ($perm !== FALSE) {
provision_file()->chmod($path, $perm, !in_array($path, $chmod_not_recursive))
->succeed('Changed permissions of <code>@path</code> to @perm')
->fail('Could not change permissions <code>@path</code> to @perm');
}
}
foreach ($chgrp as $path => $group) {
if ($group !== FALSE) {
......@@ -298,6 +292,14 @@ function _provision_drupal_create_directories($url = NULL) {
->fail('Could not change group ownership <code>@path</code> to @gid');
}
}
// Apply chmod AFTER chgrp because chgrp strips special permissions.
foreach ($mkdir as $path => $perm) {
if ($perm !== FALSE) {
provision_file()->chmod($path, $perm, !in_array($path, $chmod_not_recursive))
->succeed('Changed permissions of <code>@path</code> to @perm')
->fail('Could not change permissions <code>@path</code> to @perm');
}
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment