Skip to content

Mark /docker-entrypoint-initdb.d readable - #1456

Merged
arp242 merged 3 commits into
mainfrom
t
Nov 16, 2026
Merged

arp242 merged 3 commits into
mainfrom
t

Conversation

@arp242

@arp242 arp242 commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

My ~ is not world-readable, and those permissions persist in the Docker container, so starting a new container would error out with:

	pg18-1  | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/10-hba.sh
	pg18-1  | /usr/local/bin/docker-entrypoint.sh: line 188: /docker-entrypoint-initdb.d/10-hba.sh: Permission denied
	pg18-1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/20-config.sql
	pg18-1  | psql: error: /docker-entrypoint-initdb.d/20-config.sql: Permission denied

So mark them as readable first in the entry.sh script, which is run as root.

My ~ is not world-readable, and those permissions persist in the Docker
container, so starting a new container would error out with:

		pg18-1  | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/10-hba.sh
		pg18-1  | /usr/local/bin/docker-entrypoint.sh: line 188: /docker-entrypoint-initdb.d/10-hba.sh: Permission denied
		pg18-1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/20-config.sql
		pg18-1  | psql: error: /docker-entrypoint-initdb.d/20-config.sql: Permission denied

So mark them as readable first in the entry.sh script, which is run as
root.
@arp242
arp242 merged commit 5e0c05b into main Nov 16, 2026
16 checks passed
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.

1 participant