Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Windows 10 is always FATAL: data directory "/var/lib/postgresql/data" has wrong ownership #1

Closed
MandanaMoshref opened this issue Apr 26, 2021 · 1 comment
Assignees

Comments

@MandanaMoshref
Copy link
Member

After running Setup CKAN Docker.bat, I receive an error related to the docker_db image (error log posted below) and only appears when I run SDDI-CKAN-Docker on windows.

lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql exited with code 1
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql exited with code 1
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql | FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
lnpp-postgresql | HINT: The server must be started by the user that owns the data directory.
lnpp-postgresql exited with code 1

@MandanaMoshref
Copy link
Member Author

This is apparently a known issue for some time
docker-library/postgres#435

As referenced here: docker-library/postgres#435 (comment)
the problem is solved by mapping a local volume one directory below the location of docker-compose.yml.
The same solution is integrated here but commented out (as it only appears in windows 10 with Docker desktop).
#- ./postgres_data1:/var/lib/postgresql/data
If you still face the same error you may need to comment on the named volume and instead uncomment this line:

#- ./postgres_data1:/var/lib/postgresql/data

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant