Skip to content

Commit

Permalink
Make sure created certificate are owned by postgres user
Browse files Browse the repository at this point in the history
Close #479
  • Loading branch information
usernkey authored Aug 14, 2020
1 parent d81e775 commit 7ee4675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres-appliance/scripts/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def write_certificates(environment, overwrite):
output, _ = p.communicate()
logging.debug(output)

uid = pwd.getpwnam(environment['PGUSER_SUPERUSER']).pw_uid
uid = pwd.getpwnam('postgres').pw_uid
os.chmod(environment['SSL_PRIVATE_KEY_FILE'], 0o600)
os.chown(environment['SSL_PRIVATE_KEY_FILE'], uid, -1)

Expand Down

0 comments on commit 7ee4675

Please sign in to comment.