Skip to content

Instantly share code, notes, and snippets.

@btopro
Forked from zanesensenig/gist:654ad470077c4b648fa2
Last active August 29, 2015 14:19
Show Gist options
  • Save btopro/bdfa58154618accb67df to your computer and use it in GitHub Desktop.
Save btopro/bdfa58154618accb67df to your computer and use it in GitHub Desktop.
DEV ONLY
#!/bin/sh
base='/var/www/html'
owner='root'
webgroup='webdev'
wwwuser='apache'
# UPDATE DRUPAL CORE
#yes | drush up drupal
# UPDATE MODULES
#yes | drush up --no-core
# CLEANOUT FILES
#drush cu
# COPY PATH
sudo chown -R $owner:$webgroup "$base"
sudo chmod -R 775 "$base"
# set files directories to be owned by apache/group
for i in $(find $base/*/sites/*/files -maxdepth 0 -type d); do
sudo chown -R $wwwuser:$webgroup $i
sudo chown $wwwuser:$webgroup $i -v
sudo chmod 2774 $i -v
done
# settings in check
for i in $(find $base/*/sites/*/settings.php -type f); do
sudo chown $owner:$webgroup $i -v
sudo chmod 444 $i -v
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment