3 # fixes the cakelampvm permissions according to the way.
7 if [[ $EUID != 0 ]]; then
8 echo "This script must be run as root or sudo."
14 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
15 export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
17 source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
21 # fix up the main web storage.
22 chown -R www-data:www-data /var/www
23 test_or_die "chown www-data"
25 test_or_die "group_perm www-data"
29 # set up access on some important folders for the developer user.
30 chown -R developer:developer /home/developer
31 test_or_die "chown developer home"
32 harsh_perm /home/developer/.ssh
33 test_or_die "harsh_perm setting on developer .ssh"
34 chown -R developer:developer /etc/apache2 /etc/bind
35 test_or_die "chown apache2 and bind to developer"
36 group_perm /etc/apache2 /etc/bind
37 test_or_die "group perms on apache2 and bind"
41 # fix perms for fred user.
42 chown -R fred:fred /home/fred /home/archives/stuffing
43 test_or_die "chown fred home"
44 harsh_perm /home/fred/.ssh
45 test_or_die "harsh_perm setting on fred .ssh"
46 chown -R fred:fred /opt/feistymeow.org
47 test_or_die "chown feisty meow to fred"
48 group_perm /opt/feistymeow.org
49 test_or_die "group perms on feisty meow"
53 # some slightly tricky bits start here. we want to massage the vm into the
54 # best possible shape without needing to re-release it.
58 # copy the most recent hello file into place for the user.
59 \cp -f "$FEISTY_MEOW_APEX/production/sites/cakelampvm.com/hello.txt" "$HOME"
60 test_or_continue "copying hello file for user"
65 # deploy the site updater here to fix the local cakelampvm.com site...
70 # sequel--tell them they're great and show the hello again also.
77 Thanks for revamping your cakelampvm. :-)