From 96b9ff145e98365ddbe222b6c16f5cfc79f9dcf7 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:45:17 -0500 Subject: [PATCH] chown the database files after init --- frigate/app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frigate/app.py b/frigate/app.py index b6d493162e..01440508b4 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -231,6 +231,18 @@ class FrigateApp: migrate_db.close() + # A root frigate service (FRIGATE_ROOT_SERVICES) creates these as + # root. The wal and shm journals can be recreated as root later in + # the run; the per-boot sweep of /config realigns those on restart. + for db_file in ( + self.config.database.path, + f"{self.config.database.path}-wal", + f"{self.config.database.path}-shm", + self.config.database.path.replace("frigate.db", "backup.db"), + ): + if os.path.exists(db_file): + chown_to_runtime(db_file) + def init_go2rtc(self) -> None: for proc in psutil.process_iter(["pid", "name"]): if proc.info["name"] == "go2rtc":