Skip to content

Instantly share code, notes, and snippets.

@cAstraea
Created November 6, 2015 10:26
Show Gist options
  • Save cAstraea/e3e0e56ee0d5866032d1 to your computer and use it in GitHub Desktop.
Save cAstraea/e3e0e56ee0d5866032d1 to your computer and use it in GitHub Desktop.
fix permissions sugarcrm
APACHEUSER='bitnami:daemon'
SUGARPATH='/opt/bitnami/apps/sugarcrm/htdocs'
echo "Fixing permissions for sugarCRM"
find -P $SUGARPATH/ -type d -exec chmod 755 {} \;
find -P $SUGARPATH/ -type f -exec chmod 644 {} \;
find -P $SUGARPATH/ -name *.js -exec chmod 755 {} \;
chmod 664 $SUGARPATH/config.php
chmod 664 $SUGARPATH/config_override.php
chmod 664 $SUGARPATH/sugarcrm.log
find -P $SUGARPATH/cache -type d -exec chmod 775 {} \;
find -P $SUGARPATH/custom -type d -exec chmod 775 {} \;
find -P $SUGARPATH/data -type d -exec chmod 775 {} \;
find -P $SUGARPATH/modules -type d -exec chmod 775 {} \;
find -P $SUGARPATH/include -type d -exec chmod 775 {} \;
find -P $SUGARPATH/upload -type d -exec chmod 775 {} \;
find -P $SUGARPATH/cache -type f -exec chmod 664 {} \;
find -P $SUGARPATH/custom -type f -exec chmod 664 {} \;
find -P $SUGARPATH/data -type f -exec chmod 664 {} \;
find -P $SUGARPATH/modules -type f -exec chmod 664 {} \;
find -P $SUGARPATH/include -type f -exec chmod 664 {} \;
find -P $SUGARPATH/upload -type f -exec chmod 664 {} \;
chown -R $APACHEUSER $SUGARPATH
chmod -R g+w /opt/bitnami/apps/sugarcrm/htdocs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment