Created
September 7, 2012 21:59
-
-
Save monkyz/3670077 to your computer and use it in GitHub Desktop.
drupal permissions script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER="user" | |
DOMAIN="DOMAIN" | |
#set the site here | |
SITE="/home/$USER/public_html/$DOMAIN" | |
# group is apache user (ex: www-data) | |
USER=$USER:www-data | |
chown -R $USER $SITE | |
# set permissions for all directories | |
find $SITE -type d -exec chmod 755 {} \; | |
# set permissions for all files | |
find $SITE -type f -exec chmod 644 {} \; | |
# set permissions for boost cache | |
find $SITE/cache -type d -exec chmod 775 {} \; | |
# set permissions for boost cache | |
find $SITE/cache -type f -exec chmod 664 {} \; | |
# set permissions for all directories inside of sites/default/files | |
find $SITE/sites/default/files -type d -exec chmod 775 {} \; | |
# set permissions for files inside of sites/default/files | |
find $SITE/sites/default/files -type f -exec chmod 664 {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment