f474b2dab1490cfd8d09a0f63d91f4d40a8f5598
[feisty_meow.git] / scripts / customize / fred / scripts / cakelampvm / revamp_web_permissions.sh
1
2 # fixes the cakelampvm permissions according to the way.
3
4 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
5
6 ##############
7
8 if (( $EUID != 0 )); then
9   echo "This script must be run as root or sudo."
10   exit 1
11 fi
12
13 ##############
14
15 # make sure we have the appropriate access on a few key folders.
16 normal_perm /var/www
17
18 ##############
19
20 # change the owner for the web roots to the apache user, www-data.
21 sudo chown -R www-data:www-data /var/www
22
23 # put a couple specific ownerships into play so the appropriate user has full access.
24 sudo chown -R developer:developer /home/developer \
25   /etc/apache2 \
26   /etc/bind \
27
28
29 sudo chown -R fred:fred /home/fred \
30   /opt/feistymeow.org \
31   /home/archives/stuffing \
32
33
34 ##############
35
36 # these directories will be given group permissons that enable web server access.
37 group_perm /var/www/html \
38   /opt/feistymeow.org \
39   /etc/apache \
40   /
41
42 ##############