X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fcustomize%2Ffred%2Fscripts%2Fcakelampvm%2Frevamp_web_permissions.sh;fp=scripts%2Fcustomize%2Ffred%2Fscripts%2Fcakelampvm%2Frevamp_web_permissions.sh;h=af9693f076f5653eb20f824797a44ff3049d5f52;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=0000000000000000000000000000000000000000;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh new file mode 100755 index 00000000..af9693f0 --- /dev/null +++ b/scripts/customize/fred/scripts/cakelampvm/revamp_web_permissions.sh @@ -0,0 +1,21 @@ + +# change the owner for the web roots to the apache user, www-data. +sudo chown -R www-data:www-data /var/www + +# make sure we have the appropriate access on a few key folders. +sudo chmod u+rwx,g+rx /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. + +# 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 +