done
# Fix permissions
- chown -R root.root $base/modules
- chown -R root.root $base/themes
+ chown -R drupal.drupal $base/modules
+ chown -R drupal.drupal $base/themes
if [ -e "$base/sites/all/modules" ]; then
- chown -R root.root $base/sites/all/modules
+ chown -R drupal.drupal $base/sites/all/modules
fi
if [ -e "$base/sites/all/themes" ]; then
- chown -R root.root $base/sites/all/themes
+ chown -R drupal.drupal $base/sites/all/themes
fi
done
}
# Deploy a fresh drupal tree
wget http://ftp.drupal.org/files/projects/drupal-$new.tar.gz
tar zxvf drupal-$new.tar.gz && rm drupal-$new.tar.gz
- chown -R root.root drupal-$new/
+ chown -R drupal.drupal drupal-$new/
# Upgrade mode, erase sites folder as the previous should be copied.
if [ "$2" == "--upgrade" ]; then
# Fix permissions
if grep -qe "^$site:" /etc/passwd; then
- chown root.$site $SITES/$site/drupal/settings.php
- chown $site.$site $SITES/$site/drupal/{files,themes,modules,libraries}
+ chown drupal.$site $SITES/$site/drupal/settings.php
+ chown $site.$site $SITES/$site/drupal/{files,themes,modules,libraries}
else
- chown root.www-data $SITES/$site/drupal/settings.php
+ chown drupal.www-data $SITES/$site/drupal/settings.php
chown www-data.www-data $SITES/$site/drupal/{files,themes,modules,libraries}
fi