Skip to content

windows 10 FATAL: data directory "/var/lib/postgresql/data" has wrong ownershipΒ #558

Closed
@derakhshanfar

Description

@derakhshanfar

On Windows 10 is always failed while docker-compose up:

version: "3"
services:
  db:
    image: postgres:11.2
    environment:
      - POSTGRES_USER=test
      - POSTGRES_PASSWORD=test
      - POSTGRES_DB=test
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
    ports:
      - "5433:5432"

and here is logs

db_1  | running bootstrap script ... 2019-03-12 15:05:29.271 UTC [77] FATAL:  data directory "/var/lib/postgresql/data" has wrong ownership
db_1  | 2019-03-12 15:05:29.271 UTC [77] HINT:  The server must be started by the user that owns the data directory.
db_1  | child process exited with exit code 1
db_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
noorand_db_1 exited with code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions