From c492793c6855ce2d8d2af8656725a9ef8ed27923 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 28 Apr 2020 20:38:02 +0200 Subject: [PATCH] Set file permissions after creating the log (#53) (#54) Should fix #49 Authored-by: tituspijean --- scripts/install | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index c72e186..152db6d 100644 --- a/scripts/install +++ b/scripts/install @@ -129,15 +129,6 @@ ynh_print_info "Configuring php-fpm..." # Create a dedicated php-fpm config ynh_add_fpm_config -# set proper permissions -ynh_print_info "Set permissions..." -find $final_path -type f | xargs chmod 644 -find $final_path -type d | xargs chmod 755 - -# Set right permissions for curl install -ynh_print_info "Set rights..." -chown -R $app: $final_path - #================================================= # SETUP LOGROTATE #================================================= @@ -156,6 +147,17 @@ ynh_print_info "Configuring log rotation..." touch "$final_path/data/log.txt" ynh_use_logrotate "$final_path/data/log.txt" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= +# set proper permissions +ynh_print_info "Set permissions..." +find $final_path -type f | xargs chmod 644 +find $final_path -type d | xargs chmod 755 + +# Set right permissions for curl install +ynh_print_info "Set rights..." +chown -R $app: $final_path #================================================= # SETUP FAIL2BAN