"PostgreSQL Database directory appears to contain a database"

Hi all,

After having WSL issues preventing Docker Desktop from running, I switched the docker from WSL to Hyper-V and updated it to the lastest version, which then got the docker engine running but started this strange boot-looping like error with postgres. in the docker log for immich_postgres, I'm getting this repeated over and over:

PostgreSQL Database directory appears to contain a database; Skipping initialization


2025-06-03 19:49:33.893 UTC [1] FATAL:  data directory "/var/lib/postgresql/data" has invalid permissions

2025-06-03 19:49:33.893 UTC [1] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).


I haven't messed with any of the db configuration, and tried to look for some obvious place to force permissions but had no luck. Any ideas? Thanks!
Was this page helpful?