Created
April 24, 2012 18:57
-
-
Save fideloper/2482710 to your computer and use it in GitHub Desktop.
Script for file permssion (Expressionengine)
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
#!/bin/bash | |
# Find location of this script. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
#Standard permissions | |
find "$DIR"/ -type d -print0 | xargs -0 chmod 775 | |
find "$DIR"/ -type f -print0 | xargs -0 chmod 664 | |
#Alternatively 0777 these | |
chmod -R o+w "$DIR"/public_html/images | |
chmod -R o+w "$DIR"/templates | |
if [ -d ${DIR}/system/expressionengine/cache ]; then | |
chmod -R o+w "$DIR"/system/expressionengine/cache | |
else | |
mkdir "$DIR"/system/expressionengine/cache | |
chmod -R o+w "$DIR"/system/expressionengine/cache | |
fi | |
#Make writable. | |
chmod 0666 "$DIR"/system/expressionengine/config/config.php | |
chmod 0666 "$DIR"/system/expressionengine/config/database.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment