summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Rossouw2009-08-13 11:44:05 +0000
committeradrian2009-08-13 11:44:05 +0000
commit02f9c2e2b293444303373091aff3301e53c40d80 (patch)
tree9dd913a635687fa60d3ae30c14fcfe4241362815
parent35b7a670362a42f55a4a8a7d3cbd09118a843447 (diff)
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 #5330346.x-0.3-rc3
-rw-r--r--platform/backup.provision.inc2
-rw-r--r--platform/provision_drupal.drush.inc4
-rw-r--r--platform/provision_drupal_settings.tpl.php6
3 files changed, 9 insertions, 3 deletions
diff --git a/platform/backup.provision.inc b/platform/backup.provision.inc
index 19c6a36..587fc05 100644
--- a/platform/backup.provision.inc
+++ b/platform/backup.provision.inc
@@ -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"));
diff --git a/platform/provision_drupal.drush.inc b/platform/provision_drupal.drush.inc
index dbbfb99..f5b7c9f 100644
--- a/platform/provision_drupal.drush.inc
+++ b/platform/provision_drupal.drush.inc
@@ -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'),
diff --git a/platform/provision_drupal_settings.tpl.php b/platform/provision_drupal_settings.tpl.php
index 6b19914..4d6a75f 100644
--- a/platform/provision_drupal_settings.tpl.php
+++ b/platform/provision_drupal_settings.tpl.php
@@ -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';