requiring root access on this now.
[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   /home/archives/stuffing \
31
32
33 ##############
34
35 # these directories will be given group permissons that enable web server access.
36 group_perm /var/www/html \
37   /opt/feistymeow.org \
38   /etc/apache \
39   /
40
41 ##############