Skip to content

Instantly share code, notes, and snippets.

@jones139
Created October 9, 2011 08:13
Show Gist options
  • Save jones139/1273439 to your computer and use it in GitHub Desktop.
Save jones139/1273439 to your computer and use it in GitHub Desktop.
CodeIgniter/Bonfire - Set correct file/folder permissions for bonfire admin functions.
#!/bin/sh
# This should be run from the main CI/bonfire directory (the one that contains index.php)
# The writeableFiles list of filenames is relative to the bonfire/application directory.
# You probably need to run this as root for chgrp to work.
# Graham Jones, 08Oct2011
writeableFiles="../modules cache logs config archives db/backups db/migrations config/development config/production config/testing config/application.php config/config.php"
cd bonfire/application
for fname in $writeableFiles; do
echo $fname
chgrp -R www-data $fname
chmod g+w $fname
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment