From 96b22e7c8390599076cf761102f99265401134f8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 9 May 2021 10:24:41 +0200 Subject: [PATCH] Fix --- scripts/change_url | 1 + scripts/install | 3 ++- scripts/restore | 2 ++ scripts/upgrade | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 17b4b74..e78ed7f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -35,6 +35,7 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) db_user=$db_name +public_path=$(ynh_app_setting_get --app=$app --key=public_path) secret=$(ynh_app_setting_get --app=$app --key=secret) max_file_size=$(ynh_app_setting_get --app=$app --key=max_file_size) diff --git a/scripts/install b/scripts/install index b5a09d6..eecff6e 100644 --- a/scripts/install +++ b/scripts/install @@ -162,7 +162,7 @@ chown $app:$app $final_path/lufi.conf ynh_script_progression --message="Installing $app..." pushd $final_path - carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test + carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test popd #================================================= @@ -190,6 +190,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to app files chown -R $app:www-data $final_path +chmod -R o-rwx "$final_path" chown -R $app:www-data $public_path chmod 755 $public_path diff --git a/scripts/restore b/scripts/restore index 5944d55..6b8dfd5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +public_path=$(ynh_app_setting_get --app=$app --key=public_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) @@ -75,6 +76,7 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files chown -R $app:www-data $final_path +chmod -R o-rwx "$final_path" chmod 755 $public_path #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f55d4a1..708fe73 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -212,6 +212,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app:www-data $final_path +chmod -R o-rwx "$final_path" chown -R $app:www-data $public_path chmod 755 $public_path