Terminator365
IImmich
•Created by Terminator365 on 4/25/2025 in #help-desk-support
FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
Hi Folks, I have been using immich for some time now. I recently tried updating from 1.131.1 to the latest version. The instructions mentioned that the postgres image has been updated so I downloaded the latest docker-compose and run the usual "docker compose pull && docker compose up -d" command to launch it.
I have not been able to use immich after this. Today I took backup of the immich data including library uploads and backups. I do not see anything in the postgres folder either. I was not able to restore immich_postgres logs because the container kept restarting.
The postgres container has these logs:
initdb: removing contents of data directory "/var/lib/postgresql/data" running bootstrap script ... The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are enabled. fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 20 selecting default shared_buffers ... 400kB selecting default time zone ... Etc/UTC creating configuration files ... ok 2025-04-25 23:40:55.122 UTC [83] FATAL: data directory "/var/lib/postgresql/data" has wrong ownership 2025-04-25 23:40:55.122 UTC [83] HINT: The server must be started by the user that owns the data directory. child process exited with exit code 1This is my first post here. So would appreciate any guidance and let me know if I need to provide more data/logs to resolve this.
39 replies