Skip to content

Commit

Permalink
Set pg data permissions to 750 explicitly so it works well with pgbac…
Browse files Browse the repository at this point in the history
…krest
  • Loading branch information
shayancanonical committed Sep 24, 2024
1 parent 42a9e01 commit e7d7b5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e7d7b5a

Please sign in to comment.