Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ssl-cert-snakeoil.key permission denied #4609

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/devcontainer/_start-background-services
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

set -euo pipefail

sudo chmod 766 /etc/ssl/private
sudo chown postgres:postgres /etc/ssl/private/ssl-cert-snakeoil.key

for name in "${@}"; do
if [[ $name == postgresql ]]; then
# for some reason, uncommenting the equivalent line in the Dockerfile doesn't do the
# job. don't have time right now to figure out why.
LA="listen_addresses = '*'"
echo "$LA" | sudo tee -a /etc/postgresql/9.6/main/postgresql.conf
fi

sudo mkdir /etc/ssl/private-copy
sudo mv /etc/ssl/private/* /etc/ssl/private-copy/
sudo rm -r /etc/ssl/private
sudo mv /etc/ssl/private-copy /etc/ssl/private
sudo chmod -R 0700 /etc/ssl/private
sudo chown -R postgres /etc/ssl/private
echo "--------------------------"
echo "-- Starting $name"
echo "--------------------------"
Expand Down