From c054168ae60953d552103b65e7a88b8cf442caf4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 25 Sep 2021 13:16:23 +0200 Subject: [PATCH] Set rights --- scripts/install | 4 +++- scripts/restore | 1 + scripts/upgrade | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 6f66890..ce06240 100644 --- a/scripts/install +++ b/scripts/install @@ -215,7 +215,9 @@ ynh_store_file_checksum --file="$final_path/htdocs/conf/conf.php" # Set permissions on app files chmod 750 "$final_path" -chown -R $app: "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + chmod 644 "$final_path/htdocs/conf/conf.php" mkdir -p "$datadir" chown -R $app: "$datadir" diff --git a/scripts/restore b/scripts/restore index c7ddd28..351e8ff 100755 --- a/scripts/restore +++ b/scripts/restore @@ -100,6 +100,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # Set permissions on app files +chmod 750 "$final_path" chown -R $app: "$final_path" chmod 644 "$final_path/htdocs/conf/conf.php" mkdir -p "$datadir" diff --git a/scripts/upgrade b/scripts/upgrade index cd3d349..ec6ba1c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -249,7 +249,10 @@ ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" - #================================================= # Set permissions on app files -chown -R $app: "$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + chmod 644 "$final_path/htdocs/conf/conf.php" mkdir -p "$datadir" chown -R $app: "$datadir"