depot/third_party/nixpkgs/pkgs/servers/monitoring/uptime-kuma/fix-database-permissions.patch

13 lines
461 B
Diff
Raw Normal View History

diff --git a/server/server.js b/server/server.js
index 0c9a45e6..cec31c7c 100644
--- a/server/server.js
+++ b/server/server.js
@@ -1583,6 +1583,7 @@ async function initDatabase(testMode = false) {
if (! fs.existsSync(Database.path)) {
log.info("server", "Copying Database");
fs.copyFileSync(Database.templatePath, Database.path);
+ fs.chmodSync(Database.path, 0o640);
}
log.info("server", "Connecting to the Database");