diff --git a/scripts/install b/scripts/install index d8aed93..031ede2 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,7 @@ ynh_secure_remove "$final_path/tmp" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:$app "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION @@ -114,12 +114,12 @@ ynh_script_progression --message="Creating statedir and final_logpath..." mkdir -p $statedir chmod 750 "$statedir" chmod -R o-rwx "$statedir" -chown -R root:$app "$statedir" +chown -R $app:$app "$statedir" mkdir -p $final_logpath chmod 750 "$final_logpath" chmod -R o-rwx "$final_logpath" -chown -R root:$app "$final_logpath" +chown -R $app:$app "$final_logpath" #================================================= # ADD A CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 7c473c5..9ab6b80 100755 --- a/scripts/restore +++ b/scripts/restore @@ -73,14 +73,14 @@ ynh_restore_file --origin_path="$statedir" --not_mandatory mkdir -p $statedir chmod 750 "$statedir" chmod -R o-rwx "$statedir" -chown -R root:$app "$statedir" +chown -R $app:$app "$statedir" # Restore logs, data & permissions ynh_restore_file --origin_path="$final_logpath" --not_mandatory mkdir -p $final_logpath chmod 750 "$final_logpath" chmod -R o-rwx "$final_logpath" -chown -R root:$app "$final_logpath" +chown -R $app:$app "$final_logpath" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index e43d887..73a2024 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,7 +96,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:$app "$final_path" +chown -R $app:$app "$final_path" #================================================= # NGINX CONFIGURATION