Merge branch 'release-2.140.93'
[feisty_meow.git] / scripts / customize / fred / scripts / cakelampvm / revamp_web_permissions.sh
1
2 # change the owner for the web roots to the apache user, www-data.
3 sudo chown -R www-data:www-data         /var/www
4
5 # make sure we have the appropriate access on a few key folders.
6 sudo chmod u+rwx,g+rx                   /var/www
7
8 # put a couple specific ownerships into play so the appropriate user has full access.
9 sudo chown -R developer:developer       /var/www/defaultcake.cakelampvm.com
10 sudo chown -R fred:fred                 /var/www/webwork.repository
11 ## add others here for your own projects.
12
13 # these directories will be given group permissons that enable web server access.
14 DIR_LIST="/var/www/defaultcake.cakelampvm.com /var/www/webwork.repository"
15
16 # add in group permissions to allow the web server to serve the pages properly.
17 for currdir in $DIR_LIST; do
18   sudo find $currdir -type d -exec chmod -R u+rwx,g+rwx,o-rwx {} ';'
19   sudo find $currdir -type f -exec chmod -R u+rw,g+rw,o-rwx {} ';'
20 done
21