Commit 02f9c2e2 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Set the umask in the settings.php file, so that directories created by the web...

Set the umask in the settings.php file, so that directories created by the web server remain writable. Also chmod on the files directory is no longer generating an error. This is a critical issue that stopped verification, deleting and migration of any site with imagecache enabled. namely all open atrium sites. also fix #533034
parent 35b7a670
......@@ -50,7 +50,7 @@ function drush_provision_drupal_provision_backup($url) {
$backup_file = drush_get_option('backup_file');
// Adds the site directory into the backup file
drush_log(dt("Adding sites directory to !backup_file", array('!backup_file' => $backup_file)), 'backup');
$result = provision_shell_exec("tar -C %s -p -r -f %s .", drush_get_option('sites_path') . "/$url", $backup_file);
$result = provision_shell_exec("tar -C %s -p -c -f %s .", drush_get_option('sites_path') . "/$url", $backup_file);
if (!$result && !drush_get_option('force', false)) {
drush_set_error('PROVISION_BACKUP_FAILED', dt("Could not back up sites directory for drupal"));
......
......@@ -242,8 +242,8 @@ function _provision_drupal_create_directories($url, $profile = NULL) {
provision_path("chmod_recursive", $path, $perm,
dt("Changed permissions of <code>@path</code> to @confirm"),
dt("Could not change permissions <code>@path</code> to @confirm"),
'DRUSH_PERM_ERROR');
dt("Could not change permissions <code>@path</code> to @confirm")
);
}
foreach ($grps as $path) {
provision_path("chown_recursive", $path, drush_get_option('script_user'),
......
......@@ -31,6 +31,12 @@
@ini_set('session.use_trans_sid', 0);
@ini_set('url_rewriter.tags', '');
/**
* Set the umask so that new directories created by Drupal have the correct permissions
*/
umask(0002);
global $conf;
$conf['file_directory_path'] = conf_path() . '/files';
$conf['file_directory_temp'] = conf_path() . '/files/tmp';
......
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