depot/third_party/nixpkgs/pkgs/servers/monitoring/uptime-kuma/fix-database-permissions.patch
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

12 lines
461 B
Diff

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");