From afcade9bac0065735973022727a98e165b03abd3 Mon Sep 17 00:00:00 2001 From: Diego Lendoiro Date: Sun, 14 Jan 2018 17:49:17 +0100 Subject: [PATCH] added check for permissions and ownership. Fixes #67 --- bin/docker-entrypoint.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/docker-entrypoint.sh b/bin/docker-entrypoint.sh index 217766d..b7a52b6 100755 --- a/bin/docker-entrypoint.sh +++ b/bin/docker-entrypoint.sh @@ -166,6 +166,12 @@ php_fpm_setup() { sed -i '/^include\s/ s:^:#:' /etc/php5/fpm.d/www.conf } +check_permissions() { + chown -R nginx:nginx /var/www/passbolt + chmod -R +w /var/www/passbolt/app/tmp + chmod +w /var/www/passbolt/app/webroot/img/public +} + email_cron_job() { local root_crontab='/etc/crontabs/root' local cron_task_dir='/etc/periodic/1min' @@ -184,7 +190,6 @@ email_cron_job() { crond -f -c /etc/crontabs & } - if [ ! -f $gpg_private_key ] && [ ! -L $gpg_private_key ] || \ [ ! -f $gpg_public_key ] && [ ! -L $gpg_public_key ]; then gpg_gen_key @@ -213,6 +218,8 @@ if [ ! -f $ssl_key ] && [ ! -L $ssl_key ] && \ gen_ssl_cert fi +check_permissions + php_fpm_setup install