Skip to content

Commit

Permalink
fix bugs that postgres can't start; err:FAFATAL: data directory /var/…
Browse files Browse the repository at this point in the history
…lib/postgresql/data has group or world access

DETAIL:  Permissions should be u=rwx (0700).

Signed-off-by: milton_sun <[email protected]>
  • Loading branch information
sunlianqiang committed Feb 27, 2020
1 parent 8f4000d commit d446f75
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions templates/database/database-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ spec:
- name: "change-permission-of-directory"
image: {{ .Values.database.internal.initContainerImage.repository }}:{{ .Values.database.internal.initContainerImage.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command: ["/bin/sh"]
args: ["-c", "chown -R 999:999 /var/lib/postgresql/data"]
command:
- /bin/sh
- -c
- |
chown -R 999:999 /var/lib/postgresql/data
chmod 700 /var/lib/postgresql/data
volumeMounts:
- name: database-data
mountPath: /var/lib/postgresql/data
Expand Down

0 comments on commit d446f75

Please sign in to comment.