Commit f78effaa authored by ergonlogic's avatar ergonlogic

Issue #2099057 by cweagans, danquah, ergonlogic: Allow skipping chmod and...

Issue #2099057 by cweagans, danquah, ergonlogic: Allow skipping chmod and chgrp on created directories.
parent d9c74d68
......@@ -258,14 +258,18 @@ function _provision_drupal_create_directories($url = NULL) {
->fail('Could not create <code>@path</code>', 'DRUSH_PERM_ERROR');
}
provision_file()->chmod($path, $perm, !in_array($path, $not_recursive))
->succeed('Changed permissions of <code>@path</code> to @perm')
->fail('Could not change permissions <code>@path</code> to @perm');
if ($perm !== FALSE) {
provision_file()->chmod($path, $perm, !in_array($path, $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) {
provision_file()->chgrp($path, $group, !in_array($path, $not_recursive))
->succeed('Changed group ownership of <code>@path</code> to @gid')
->fail('Could not change group ownership <code>@path</code> to @gid');
if ($group !== FALSE) {
provision_file()->chgrp($path, $group, !in_array($path, $not_recursive))
->succeed('Changed group ownership of <code>@path</code> to @gid')
->fail('Could not change group ownership <code>@path</code> to @gid');
}
}
}
......
......@@ -197,6 +197,7 @@ function hook_provision_config_load_templates_alter(&$templates, $config) {
*/
function hook_provision_drupal_create_directories_alter(&$mkdir, $url) {
$mkdir["sites/$url/my_special_dir"] = 02770;
$mkdir["sites/$url/my_other_dir"] = FALSE; // Skip the chmod on this directory.
}
/**
......@@ -209,4 +210,5 @@ function hook_provision_drupal_create_directories_alter(&$mkdir, $url) {
*/
function hook_provision_drupal_chgrp_directories_alter(&$chgrp, $url) {
$chgrp["sites/$url/my_special_dir"] = d('@server_master')->web_group;
$chgrp["sites/$url/my_other_dir"] = FALSE; // Skip the chgrp on this directory.
}
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