Skip to content

Conversation

@cbandy
Copy link
Member

@cbandy cbandy commented Jul 31, 2025

Postgres has allowed group-read on its data directories since v11. This permission enables more avenues for data recovery when storage misbehaves.

🙇🏻 This includes some unrelated fixes and improvements to the test suite.

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • Bug fix
  • Testing enhancement

What is the current behavior (link to any open issues here)?

PGO sets permissions on Postgres directories to 0700 after which Postgres creates files and directories with zero group permissions, g-rwx.

What is the new behavior (if this is a feature change)?

PGO sets permissions on these directories to 0750, the most liberal allowed by Postgres. With that, Postgres creates files and directories with group-read, g+rx. This group access allows:

  • PGO to read these files when the container UID changes, e.g. OpenShift SCC mistakes.
  • other processes in the pod to read these files, e.g. log files in the data directory.

Other Information:

Issue: PGO-300

cbandy added 4 commits July 31, 2025 13:50
Without this, the relative path to the "external-snapshotter" module
would be incorrect depending on the symlinks involved.
Postgres has allowed group-read on its data directories since v11.
This permission enables more avenues for data recovery when storage
misbehaves.

Issue: PGO-300
@cbandy cbandy merged commit c7842e7 into CrunchyData:main Jul 31, 2025
20 checks passed
@cbandy cbandy deleted the postgres-group-read branch July 31, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants