I
Immich4mo ago
Shingo

Postgres permission error, not sure whats wrong? - fresh install

compose file attached. Permissions errors:
postgres14 | 2025-01-27 21:23:25.396 UTC [37] FATAL: could not open file "global/pg_filenode.map": Permission denied
postgres14 | 2025-01-27 21:23:28.420 UTC [38] FATAL: could not open file "global/pg_filenode.map": Permission denied
postgres14 | 2025-01-27 21:23:31.156 UTC [33] PANIC: could not open file "pg_wal/000000010000000000000001": Permission denied
postgres14 | 2025-01-27 21:23:31.395 UTC [1] LOG: WAL writer process (PID 33) was terminated by signal 6: Aborted
postgres14 | 2025-01-27 21:23:31.395 UTC [1] LOG: terminating any other active server processes
postgres14 | 2025-01-27 21:23:31.395 UTC [35] LOG: could not open temporary statistics file "pg_stat/global.tmp": Permission denied
postgres14 | 2025-01-27 21:23:31.399 UTC [1] LOG: all server processes terminated; reinitializing
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "base/pgsql_tmp": Permission denied
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "base": Permission denied
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "pg_tblspc": Permission denied
postgres14 | 2025-01-27 21:23:31.402 UTC [1] PANIC: could not open file "global/pg_control": Permission denied
postgres14 | 2025-01-27 21:23:25.396 UTC [37] FATAL: could not open file "global/pg_filenode.map": Permission denied
postgres14 | 2025-01-27 21:23:28.420 UTC [38] FATAL: could not open file "global/pg_filenode.map": Permission denied
postgres14 | 2025-01-27 21:23:31.156 UTC [33] PANIC: could not open file "pg_wal/000000010000000000000001": Permission denied
postgres14 | 2025-01-27 21:23:31.395 UTC [1] LOG: WAL writer process (PID 33) was terminated by signal 6: Aborted
postgres14 | 2025-01-27 21:23:31.395 UTC [1] LOG: terminating any other active server processes
postgres14 | 2025-01-27 21:23:31.395 UTC [35] LOG: could not open temporary statistics file "pg_stat/global.tmp": Permission denied
postgres14 | 2025-01-27 21:23:31.399 UTC [1] LOG: all server processes terminated; reinitializing
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "base/pgsql_tmp": Permission denied
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "base": Permission denied
postgres14 | 2025-01-27 21:23:31.400 UTC [1] LOG: could not open directory "pg_tblspc": Permission denied
postgres14 | 2025-01-27 21:23:31.402 UTC [1] PANIC: could not open file "global/pg_control": Permission denied
36 Replies
Immich
Immich4mo ago
:wave: Hey @Shingo, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Immich
Immich4mo ago
Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
GitHub
immich-app immich · Discussions
Explore the GitHub Discussions forum for immich-app immich. Discuss code, ask questions & collaborate with the developer community.
GitHub
Issues · immich-app/immich
High performance self-hosted photo and video management solution. - Issues · immich-app/immich
Immich
Immich4mo ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
bo0tzz
bo0tzz4mo ago
Can you also post the other info?
Shingo
ShingoOP4mo ago
☑️ read applicable release notes. - nothing explaining the permissions in a fresh install ☑️ reviewed the FAQs for known issues. - followed install guide (as best I can from the github site) ☑️ reviewed Github for known issues. - fresh install, using docker compose. ☑️ tried accessing Immich via local ip (without a custom reverse proxy). - no proxy, local only ☑️ uploaded the relevant information (see below). - using default .env file (no changes) - running in an ubuntu vm on proxmox, both latest - deleted, pruned, remade, etc, always a permission issue ☑️ tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable - containers arrent running, NA
Zeus
Zeus4mo ago
What filesystem and OS/deployment are you using?
Shingo
ShingoOP4mo ago
Ubuntu 24, and ext4 system was built yesterday, and docker setup today, and immich today as well
Zeus
Zeus4mo ago
can you please post output of df -h and ls -l /home/case/immich also sudo docker ps -a
Shingo
ShingoOP4mo ago
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
960f6e2a50a0 tensorchord/pgvecto-rs:pg14-v0.2.0 "docker-entrypoint.s…" 3 hours ago Exited (139) 2 hours ago postgres14
b167367c13e9 ghcr.io/imagegenius/immich:latest "/init" 3 hours ago Exited (137) 2 hours ago immich
02814000155c redis "docker-entrypoint.s…" 3 hours ago Exited (0) 2 hours ago redis
1921311a36ad ghcr.io/ajnart/homarr:latest "sh ./scripts/run.sh" 9 hours ago Up 5 hours (healthy) 0.0.0.0:9000->7575/tcp, [::]:9000->7575/tcp homarr
root@seh:/home/case/immich#
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
960f6e2a50a0 tensorchord/pgvecto-rs:pg14-v0.2.0 "docker-entrypoint.s…" 3 hours ago Exited (139) 2 hours ago postgres14
b167367c13e9 ghcr.io/imagegenius/immich:latest "/init" 3 hours ago Exited (137) 2 hours ago immich
02814000155c redis "docker-entrypoint.s…" 3 hours ago Exited (0) 2 hours ago redis
1921311a36ad ghcr.io/ajnart/homarr:latest "sh ./scripts/run.sh" 9 hours ago Up 5 hours (healthy) 0.0.0.0:9000->7575/tcp, [::]:9000->7575/tcp homarr
root@seh:/home/case/immich#
root@seh:/home/case/immich# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 791M 1.8M 789M 1% /run
/dev/sda2 31G 19G 11G 65% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
efivarfs 256K 66K 185K 27% /sys/firmware/efi/efivars
/dev/sda1 1.1G 6.2M 1.1G 1% /boot/efi
tmpfs 791M 92K 791M 1% /run/user/120
overlay 31G 19G 11G 65% /var/lib/docker/overlay2/9312342e4305588d7a5e99a091d418d7e8658a78d72b0f0ac35ce0654ecdbb82/merged
tmpfs 791M 80K 791M 1% /run/user/1000
//192.168.3.5/vault 74T 26T 49T 35% /home/case/truenas
root@seh:/home/case/immich# ls -l /home/case/immich
total 16
drwxrwxrwx 20 case case 4096 Jan 27 16:14 db1
drwx------ 20 case case 4096 Jan 27 17:21 db2
-rwxrwxrwx 1 case case 1387 Jan 27 16:18 docker-compose.yml
drwxrwxrwx 3 case case 4096 Jan 27 16:12 machine-learning
root@seh:/home/case/immich#
root@seh:/home/case/immich# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 791M 1.8M 789M 1% /run
/dev/sda2 31G 19G 11G 65% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
efivarfs 256K 66K 185K 27% /sys/firmware/efi/efivars
/dev/sda1 1.1G 6.2M 1.1G 1% /boot/efi
tmpfs 791M 92K 791M 1% /run/user/120
overlay 31G 19G 11G 65% /var/lib/docker/overlay2/9312342e4305588d7a5e99a091d418d7e8658a78d72b0f0ac35ce0654ecdbb82/merged
tmpfs 791M 80K 791M 1% /run/user/1000
//192.168.3.5/vault 74T 26T 49T 35% /home/case/truenas
root@seh:/home/case/immich# ls -l /home/case/immich
total 16
drwxrwxrwx 20 case case 4096 Jan 27 16:14 db1
drwx------ 20 case case 4096 Jan 27 17:21 db2
-rwxrwxrwx 1 case case 1387 Jan 27 16:18 docker-compose.yml
drwxrwxrwx 3 case case 4096 Jan 27 16:12 machine-learning
root@seh:/home/case/immich#
Zeus
Zeus4mo ago
are you running docker as root/sudo? how did you install docker? can you also post docker inspect postgres14 if you're on normal ubuntu you might do better with our standard compsoe file as well, instead of the imagegenius
Shingo
ShingoOP4mo ago
Run as sudo
Shingo
ShingoOP4mo ago
Shingo
ShingoOP4mo ago
I am game to run the standard one shall I prune and delete images?
Zeus
Zeus4mo ago
can you confirm if you run docker compose up -d you still get lots of postgres errors? i don't see anything super wrong here let me know this one
Shingo
ShingoOP4mo ago
Docker Documentation
Ubuntu
Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install Docker Engine on Ubuntu.
Zeus
Zeus4mo ago
Docker Documentation
Ubuntu
Jumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install Docker Engine on Ubuntu.
Zeus
Zeus4mo ago
very strange
Shingo
ShingoOP4mo ago
running as root or sudo same answer
root@seh:/home/case/immich# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
960f6e2a50a0 tensorchord/pgvecto-rs:pg14-v0.2.0 "docker-entrypoint.s…" 3 hours ago Exited (139) 12 seconds ago postgres14
b167367c13e9 ghcr.io/imagegenius/immich:latest "/init" 3 hours ago Up 29 seconds 0.0.0.0:9001->8080/tcp, [::]:9001->8080/tcp immich
02814000155c redis "docker-entrypoint.s…" 3 hours ago Up 29 seconds 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis
1921311a36ad ghcr.io/ajnart/homarr:latest "sh ./scripts/run.sh" 9 hours ago Up 5 hours (healthy) 0.0.0.0:9000->7575/tcp, [::]:9000->7575/tcp homarr
root@seh:/home/case/immich# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
960f6e2a50a0 tensorchord/pgvecto-rs:pg14-v0.2.0 "docker-entrypoint.s…" 3 hours ago Exited (139) 12 seconds ago postgres14
b167367c13e9 ghcr.io/imagegenius/immich:latest "/init" 3 hours ago Up 29 seconds 0.0.0.0:9001->8080/tcp, [::]:9001->8080/tcp immich
02814000155c redis "docker-entrypoint.s…" 3 hours ago Up 29 seconds 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis
1921311a36ad ghcr.io/ajnart/homarr:latest "sh ./scripts/run.sh" 9 hours ago Up 5 hours (healthy) 0.0.0.0:9000->7575/tcp, [::]:9000->7575/tcp homarr
Zeus
Zeus4mo ago
try a docker compose down; docker image prune -a, then use our official compose and env
Shingo
ShingoOP4mo ago
make a new directory too ?
Zeus
Zeus4mo ago
fresh directory, yes. and it will auto make the subfolders in that folder so for exampole put th ecompose and env in immich-new and let is make the folders once it works you can move stuff around but let's keep it simple for now
Shingo
ShingoOP4mo ago
for the .env file, should I populate it with the appropriate directory ? or run raw and then down and edit it after we see it running ?
Zeus
Zeus4mo ago
i would run raw you can easily do a down; mv; up
Shingo
ShingoOP4mo ago
pulling now ok, it's running, did the first touch wizard, and logged in, no errors in the console
Zeus
Zeus4mo ago
if you logged in it's working if you want to move the UPLOAD_LOCATION (stored pictures/vids) you can do a down, mv the folder to the new location, set the UPLOAD_LOCATION, then up no real reason to move the database, that needs to be on local storage
Shingo
ShingoOP4mo ago
right, should i change anything if I'm using an smb share mounted as a directory to the local file system?
Zeus
Zeus4mo ago
SMB is fine for the UPLOAD_LOCATION wait, were you using that for the database..? I didn't see that on df
Shingo
ShingoOP4mo ago
no, db was always local
Zeus
Zeus4mo ago
ok, got it. then not sure why it did not work earlier smb is fine for the upload
Shingo
ShingoOP4mo ago
kk, is there an easy way to import the files that are already on the smb share? or will it see stuff and know what to do ? i had it running on another host, and the pi memory card died, so i moved eveyrthing to a proxmox vm host but the previous uiploads are there, but in a different directory I know there's a bulk upload tool, but is there an easier way?
Zeus
Zeus4mo ago
Do you have a database backup? It might be in the backups folder
Shingo
ShingoOP4mo ago
nope, it died on the sd card
Zeus
Zeus4mo ago
Then no, gotta bulk upload
Shingo
ShingoOP4mo ago
maybe, one sec i'll check like 15 compressed sql files and one .immich file
Shingo
ShingoOP4mo ago
thanks

Did you find this page helpful?