From 1eea9b0c51a4abdfb6ef5ae9898f500980c51b36 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 11 Nov 2017 22:32:00 -0500 Subject: [PATCH] modernized this permission script --- .../cakelampvm/revamp_web_permissions.sh | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh index af9693f0..33d3fa68 100755 --- a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh +++ b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh @@ -1,21 +1,34 @@ -# change the owner for the web roots to the apache user, www-data. -sudo chown -R www-data:www-data /var/www +# fixes the cakelampvm permissions according to the way. + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + +############## # make sure we have the appropriate access on a few key folders. -sudo chmod u+rwx,g+rx /var/www +normal_perm /var/www + +############## + +# change the owner for the web roots to the apache user, www-data. +sudo chown -R www-data:www-data /var/www # put a couple specific ownerships into play so the appropriate user has full access. -sudo chown -R developer:developer /var/www/defaultcake.cakelampvm.com -sudo chown -R fred:fred /var/www/webwork.repository -## add others here for your own projects. +sudo chown -R developer:developer /home/developer \ + /etc/apache2 \ + /etc/bind \ + + +sudo chown -R fred:fred /home/fred \ + /home/archives/stuffing \ -# these directories will be given group permissons that enable web server access. -DIR_LIST="/var/www/defaultcake.cakelampvm.com /var/www/webwork.repository" -# add in group permissions to allow the web server to serve the pages properly. -for currdir in $DIR_LIST; do - sudo find $currdir -type d -exec chmod -R u+rwx,g+rwx,o-rwx {} ';' - sudo find $currdir -type f -exec chmod -R u+rw,g+rw,o-rwx {} ';' -done +############## + +# these directories will be given group permissons that enable web server access. +group_perm /var/www/html \ + /opt/feistymeow.org \ + /etc/apache \ + / +############## -- 2.34.1