From 1c4a48258fd60edff32c719a353c88c505494c9d Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 26 Nov 2024 18:16:15 +0100 Subject: [PATCH] Only set ownership/permissions once the file was created Signed-off-by: DL6ER --- gravity.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gravity.sh b/gravity.sh index 6ffac4b0..ccba6c74 100755 --- a/gravity.sh +++ b/gravity.sh @@ -441,11 +441,6 @@ gravity_DownloadBlocklists() { continue fi - # Chown the file to the pihole user - # This is necessary for the FTL to be able to update the file - # when gravity is run from the web interface - fix_owner_permissions "${saveLocation}" - echo -e " ${INFO} Target: ${url}" local regex check_url # Check for characters NOT allowed in URLs @@ -746,7 +741,7 @@ gravity_ParseFileIntoDomains() { -e 's/^.*\s+//g' \ -e '/^$/d' "${destination}" - chmod 644 "${destination}" + fix_owner_permissions "${destination}" } # Report number of entries in a table