b138484c91893fc87ad5235daf040d3638c3d5cb
[feisty_meow.git] / scripts / customize / fred / scripts / cakelampvm / revamp_web_permissions.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 /opt/feistymeow.org /etc/apache2 /etc/bind 
29 normal_perm /opt/feistymeow.org 
30 harsh_perm /home/developer/.ssh
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
39 ##############
40