From ff525fbcb909048b9b589e4366ff9b0f8d21c417 Mon Sep 17 00:00:00 2001 From: Philipp Geyer Date: Fri, 28 Jan 2022 21:31:55 +0000 Subject: Changing permissions on deployed directory --- appspec.yml | 4 ++++ scripts/permissions.sh | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 scripts/permissions.sh diff --git a/appspec.yml b/appspec.yml index c38058c..a7e1ff7 100644 --- a/appspec.yml +++ b/appspec.yml @@ -4,6 +4,10 @@ files: - source: / destination: /home/ec2-user/philippgeyer.co.uk hooks: + AfterInstall: + - location: scripts/permissions.sh + timeout: 300 + runas: root ApplicationStart: - location: scripts/build.sh timeout: 300 diff --git a/scripts/permissions.sh b/scripts/permissions.sh new file mode 100644 index 0000000..649c586 --- /dev/null +++ b/scripts/permissions.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +DIR=/home/ec2-user/philippgeyer.co.uk + +chown -R web:web ${DIR} -- cgit v1.2.3-70-g09d2