From: ralfbrown <ralfbrown@users.noreply.github.com>
Date: Tue, 20 May 2025 04:44:02 -0400
X-Dgit-Generated: 5.0.1-2 ee7d4a156463ee2d04c57dfe243172d8cbceb1bd
Subject: add user-read permission to dummy database backup files

(cherry picked from commit d8c060354ac3d37f5f668c34d636ad08c0eb570f)

---

diff --git a/src/common/database.c b/src/common/database.c
index eda9d2e4cc..5a05a7ef22 100644
--- a/src/common/database.c
+++ b/src/common/database.c
@@ -4079,7 +4079,7 @@ void dt_database_backup(const char *filename)
     else
     {
       // there is nothing to backup, create an empty file to prevent further backup attempts
-      const int fd = g_open(backup, O_CREAT, S_IWUSR);
+      const int fd = g_open(backup, O_CREAT, S_IWUSR | S_IRUSR);
       if(fd < 0 || !g_close(fd, &gerror)) copy_status = FALSE;
     }
     if(!copy_status)
