91f26f4b0765b3ce466a2bdc229501a0ecde2e0a
[feisty_meow.git] / scripts / site_avenger / revamp_cakelampvm.sh
1 #!/bin/bash
2
3 # fixes the cakelampvm permissions according to the way.
4
5 ##############
6
7 if [[ $EUID != 0 ]]; then
8   echo "This script must be run as root or sudo."
9   exit 1
10 fi
11
12 ##############
13
14 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
15 export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
16
17 source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
18
19 ##############
20
21 # fix up the main web storage.
22 chown -R www-data:www-data /var/www 
23 group_perm /var/www 
24
25 ##############
26
27 # set up access on some important folders for the developer user.
28 chown -R developer:developer /home/developer
29 harsh_perm /home/developer/.ssh
30 chown -R developer:developer /etc/apache2 /etc/bind 
31 group_perm /etc/apache2 /etc/bind 
32
33 ##############
34
35 # fix perms for fred user.
36 chown -R fred:fred /home/fred /home/archives/stuffing 
37 harsh_perm /home/fred/.ssh
38 chown -R fred:fred /opt/feistymeow.org 
39 group_perm /opt/feistymeow.org 
40
41 ##############
42
43 #hmmm: todo
44 # deploy the site updater here to fix the local cakelampvm.com site...
45
46
47