From 5e177424af02dc14c20c9d120304e6e135d519e4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 21 Nov 2021 09:38:01 +0100 Subject: [PATCH] Update install --- scripts/install | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index dd617ab..19b4985 100644 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app #--home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -74,10 +74,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/} -chown -R $app:www-data "$final_path" +#chmod 750 "$final_path" +#chmod -R o-rwx "$final_path" +#chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/} +#chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION @@ -132,6 +132,16 @@ fi # Installing the config file and replace the placeholders ynh_add_config --template="../conf/config.json.php" --destination="$final_path/data/config.json.php" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= +# set proper permissions +ynh_script_progression --message="Securing files and directories..." + +chown -R $app: $final_path +chmod -R g+rX $final_path +chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/} + #================================================= # SETUP FAIL2BAN #=================================================