From 7d54bfd1010c57b9278e4d057dc2a41292ad1221 Mon Sep 17 00:00:00 2001 From: Gredin 67 Date: Wed, 15 Dec 2021 02:57:11 +0100 Subject: [PATCH] secure files --- scripts/install | 11 +++++++++++ scripts/restore | 11 +++++++++++ scripts/upgrade | 9 +++++++++ 3 files changed, 31 insertions(+) diff --git a/scripts/install b/scripts/install index a70a476..282d912 100644 --- a/scripts/install +++ b/scripts/install @@ -151,6 +151,17 @@ ynh_script_progression --message="Storing the config file checksum..." # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="/etc/onlyoffice/documentserver/default.json" +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # RELOAD ONLYOFFICE #================================================= diff --git a/scripts/restore b/scripts/restore index 9d78ad9..81e9757 100644 --- a/scripts/restore +++ b/scripts/restore @@ -117,6 +117,17 @@ ynh_script_progression --message="Generating fonts..." /usr/bin/documentserver-generate-allfonts.sh +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # RELOAD ONLYOFFICE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 819d017..b92df34 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,6 +153,15 @@ ynh_script_progression --message="Generating fonts..." #================================================= # GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # RELOAD ONLYOFFICE #=================================================