From 5a601159579aadbbdba607ef61030debe8f65c6c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 19 Oct 2011 18:20:48 -0200 Subject: Always fix permissions at drupal_install --- templates/drupal.sh.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'templates') diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb index aefc9f3..7963dcf 100644 --- a/templates/drupal.sh.erb +++ b/templates/drupal.sh.erb @@ -270,15 +270,6 @@ function drupal_install { cp $BASE/drupal-$series/sites/default/default.settings.php $SITES/$site/drupal/settings.php chmod 640 $SITES/$site/drupal/settings.php - # Set files folder permission - if grep -qe "^$site:" /etc/passwd; then - chown root.$site $SITES/$site/drupal/settings.php - chown $site.$site $SITES/$site/drupal/files - else - chown root.www-data $SITES/$site/drupal/settings.php - chown www-data.www-data $SITES/$site/drupal/files - fi - ( echo "Creating symlinks..." cd $BASE/drupal-$series/sites @@ -322,6 +313,15 @@ EOF --uri="$site" --sites-subdir="$site" --account-name="$admin" --account-mail="$admin_email" ) + # Fix permissions + if grep -qe "^$site:" /etc/passwd; then + chown root.$site $SITES/$site/drupal/settings.php + chown $site.$site $SITES/$site/drupal/files + else + chown root.www-data $SITES/$site/drupal/settings.php + chown www-data.www-data $SITES/$site/drupal/files + fi + echo "Done. Please check your installation." } -- cgit v1.2.3