Skip to content

Instantly share code, notes, and snippets.

@fideloper
Created April 24, 2012 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fideloper/2482710 to your computer and use it in GitHub Desktop.
Save fideloper/2482710 to your computer and use it in GitHub Desktop.
Script for file permssion (Expressionengine)
#!/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