Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres 14 failing to start because of permission errors #465

Open
notimadam123 opened this issue Nov 14, 2024 · 4 comments
Open

Postgres 14 failing to start because of permission errors #465

notimadam123 opened this issue Nov 14, 2024 · 4 comments

Comments

@notimadam123
Copy link

postgres14  | creating subdirectories ... ok
postgres14  | selecting dynamic shared memory implementation ... posix
postgres14  | selecting default max_connections ... 20
postgres14  | selecting default shared_buffers ... 400kB
postgres14  | selecting default time zone ... Etc/UTC
postgres14  | creating configuration files ... ok
postgres14  | 2024-11-14 21:33:16.837 UTC [82] FATAL:  data directory "/var/lib/postgresql/data" has invalid permissions
postgres14  | 2024-11-14 21:33:16.837 UTC [82] DETAIL:  Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
postgres14  | child process exited with exit code 1
postgres14  | initdb: removing contents of data directory "/var/lib/postgresql/data"

Ive tried chmodding my postgres and immich directory to 0700 and 0750, and chowning it to my user, root and the docker user but it doesnt work

@hydazz
Copy link
Member

hydazz commented Nov 18, 2024

postgres' folder should be owned by postgres:postgres within the container

@notimadam123
Copy link
Author

I changed the permissions to that but it's the same thing

@hydazz
Copy link
Member

hydazz commented Nov 18, 2024

what does ls -la /var/lib/postgresql/data show within the postgres container?

@notimadam123
Copy link
Author

notimadam123 commented Nov 18, 2024

total 0
drwxrwxr-x 1 postgres postgres 0 Nov 18 23:29 .
drwxr-xr-x 1 postgres postgres 8 Feb 21  2024 ..

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

No branches or pull requests

2 participants