Created
July 7, 2014 23:58
-
-
Save colby/abc6ce8ac2862de41cbd to your computer and use it in GitHub Desktop.
A small bash script to set the required permissions for an ExpressionEngine installation.
This file contains 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
#!/usr/bin/env bash | |
pushd /var/www/html/ | |
# Set default permissions | |
find . -type d -exec chmod 755 '{}' ';' | |
find . -type f -exec chmod 644 '{}' ';' | |
# Set directories permissions | |
ee_dirs=( | |
system/expressionengine/cache/ | |
images/avatars/uploads/ | |
images/captchas/ | |
images/member_photos/ | |
images/pm_attachments/ | |
images/signature_attachments/ | |
images/uploads/ | |
) | |
for dir in ${ee_dirs[@]}; do | |
chmod -R 777 $dir | |
done | |
# Set config file permissions | |
chmod 666 system/expressionengine/config/config.php | |
chmod 666 system/expressionengine/config/database.php | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment