nixpkgs/pkgs/by-name/up/uptime-kuma/fix-database-permissions.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
461 B
Diff
Raw Normal View History

2022-09-23 04:30:54 +00:00
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");