diff --git a/scripts/install b/scripts/install index a203ae7..09e6121 100644 --- a/scripts/install +++ b/scripts/install @@ -84,10 +84,6 @@ 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 755 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -147,6 +143,10 @@ ynh_add_config --template="../conf/config.json.example" --destination="$final_pa chmod 600 "$final_path/config/config.json" chown $app:$app "$final_path/config/config.json" +chmod 755 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index f81628e..1f0097a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -62,10 +62,6 @@ ynh_script_progression --message="Restoring $app main directory..." --weight=20 ynh_restore_file --origin_path="$final_path" -chmod 755 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # SPECIFIC RESTORATION #================================================= @@ -97,6 +93,10 @@ chmod 750 "$data_path" chmod -R o-rwx "$data_path" chown -R $app:www-data "$data_path" +chmod 755 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" + #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ad4e2f3..63eac9b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,10 +85,6 @@ then ynh_setup_source --dest_dir=$final_path fi -chmod 755 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -131,6 +127,10 @@ ynh_add_config --template="../conf/config.json.example" --destination="$final_pa chmod 600 "$final_path/config/config.json" chown $app:$app "$final_path/config/config.json" +chmod 755 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app: "$final_path" + #================================================= # SETUP SYSTEMD #=================================================