Skip to content

Instantly share code, notes, and snippets.

@colby
Created July 7, 2014 23:58
Show Gist options
  • Save colby/abc6ce8ac2862de41cbd to your computer and use it in GitHub Desktop.
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.
#!/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