From e7d7b5aa892b1ee9278af4db588831c0ddccc794 Mon Sep 17 00:00:00 2001 From: Shayan Patel Date: Tue, 24 Sep 2024 00:41:17 +0000 Subject: [PATCH] Set pg data permissions to 750 explicitly so it works well with pgbackrest --- src/charm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/charm.py b/src/charm.py index 746561dc5e..3624c37e2c 100755 --- a/src/charm.py +++ b/src/charm.py @@ -884,10 +884,8 @@ def _create_pgdata(self, container: Container): """Create the PostgreSQL data directory.""" if not container.exists(self.pgdata_path): container.make_dir( - self.pgdata_path, permissions=0o700, user=WORKLOAD_OS_USER, group=WORKLOAD_OS_GROUP + self.pgdata_path, permissions=0o750, user=WORKLOAD_OS_USER, group=WORKLOAD_OS_GROUP ) - else: - container.exec(["chmod", "700", self.pgdata_path]).wait() # Also, fix the permissions from the parent directory. container.exec([ "chown",