From 6354bc02dbde855dc37a6010dd1418e8ea1c46fb Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Thu, 7 Jan 2016 15:28:21 +0000 Subject: [PATCH] Make repo be owned by ubuntu not root post code deploy deployment. --- appspec.yml | 4 ++++ scripts/aws_change_ownership.sh | 5 +++++ 2 files changed, 9 insertions(+) create mode 100755 scripts/aws_change_ownership.sh diff --git a/appspec.yml b/appspec.yml index cefddcb1d..8d617ca3d 100644 --- a/appspec.yml +++ b/appspec.yml @@ -9,6 +9,10 @@ hooks: location: scripts/aws_install_dependencies.sh runas: root timeout: 300 + - + location: scripts/aws_change_ownership.sh + runas: root + timeout: 300 ApplicationStart: - location: scripts/aws_start_app.sh diff --git a/scripts/aws_change_ownership.sh b/scripts/aws_change_ownership.sh new file mode 100755 index 000000000..411d380b1 --- /dev/null +++ b/scripts/aws_change_ownership.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "Chown application to be owned by ubuntu" +cd /home/ubuntu/; +chown -R ubuntu:ubuntu notifications-api