From 4941a424f10ed149db43d70f4846af3776737b38 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Wed, 26 Dec 2018 11:25:29 +0530 Subject: Set right permission to app while upgrade --- scripts/upgrade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f1be8c1..d337e6d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,8 +109,6 @@ ynh_install_app_dependencies \ # STANDARD UPGRADE STEPS #================================================= -# Change owner of live folder -chown -R $app: $final_path/live # Stop Mastodon Services # Restart Mastodon @@ -142,6 +140,8 @@ ynh_add_nginx_config ynh_setup_source "$final_path/.rbenv" "app-rbenv" ynh_setup_source "$final_path/.rbenv/plugins/ruby-build" "app-ruby-build" +chown -R "$app": "$final_path" + # Install ruby 2.5.1 ( exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.3 || true @@ -186,6 +186,10 @@ pushd ~/live RAILS_ENV=production $final_path/.rbenv/versions/2.5.3/bin/bundle exec rails db:migrate COMMANDS ) + +# permissions to app files +chown -R "$app": "$final_path" + #================================================= # SETUP SYSTEMD #================================================= -- cgit v1.2.3-70-g09d2