Skip to content

Commit b41e4f2

Browse files
committed
[DPE-5915] Reduce pgdate permissions (#759)
* Reduce pgdate permissions * Disable indico tests
1 parent 8c186b8 commit b41e4f2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/charm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ def _create_pgdata(self, container: Container):
864864
path = f"{self._storage_path}/pgdata"
865865
if not container.exists(path):
866866
container.make_dir(
867-
path, permissions=0o770, user=WORKLOAD_OS_USER, group=WORKLOAD_OS_GROUP
867+
path, permissions=0o750, user=WORKLOAD_OS_USER, group=WORKLOAD_OS_GROUP
868868
)
869869
# Also, fix the permissions from the parent directory.
870870
container.exec([

tests/integration/new_relations/test_new_relations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ async def test_discourse(ops_test: OpsTest):
664664

665665

666666
@pytest.mark.group(1)
667+
@pytest.mark.unstable
667668
@markers.amd64_only # indico charm not available for arm64
668669
async def test_indico_datatabase(ops_test: OpsTest) -> None:
669670
"""Tests deploying and relating to the Indico charm."""

tests/unit/test_charm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ def test_create_pgdata(harness):
17761776
container.exists.return_value = False
17771777
harness.charm._create_pgdata(container)
17781778
container.make_dir.assert_called_once_with(
1779-
"/var/lib/postgresql/data/pgdata", permissions=504, user="postgres", group="postgres"
1779+
"/var/lib/postgresql/data/pgdata", permissions=488, user="postgres", group="postgres"
17801780
)
17811781
container.exec.assert_called_once_with([
17821782
"chown",

0 commit comments

Comments
 (0)