Skip to content

Instantly share code, notes, and snippets.

@otengkwame
Forked from jones139/setFolderPerms.sh
Created July 15, 2019 14:28
Show Gist options
  • Save otengkwame/57557cfa781eb801d59c05a25fdeafe8 to your computer and use it in GitHub Desktop.
Save otengkwame/57557cfa781eb801d59c05a25fdeafe8 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