Skip to content

Podman windows initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted #24992

Answered by eriksjolund
majidmadadi asked this question in Q&A
Discussion options

You must be logged in to vote

I forgot to say, using named volumes is often easier than using directories.

To use a named volume, run these commands

podman volume create myvol
podman run --name pg -it --rm -v myvol:/var/lib/postgresql/data -e POSTGRES_PASSWORD=insecurepassword postgres

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@majidmadadi
Comment options

@eriksjolund
Comment options

@eriksjolund
Comment options

Answer selected by majidmadadi
@majidmadadi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants