I
Immich4mo ago
Andrino

"Failed to write, EACCES: permission denied" for custom files location

I am trying to move my "thumbs" and "encode-video" folders to another location on the same machine. I'm running Proxmox with an LXC of Runtipi, with Immich installed within. Similar to running Portainer with Immich within. I have an external hard drive with plenty of free space, and want the Immich generated thumbs/videos to be stored there. I have successfully mount/binded the drive in Proxmox and passed it through to the LXC fine. But when I try to run Immich it reports this error:
immich| [Nest] 7 - 01/14/2025, 6:47:12 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
immich| [Nest] 7 - 01/14/2025, 6:47:12 PM ERROR [Microservices:StorageService] Failed to write upload/thumbs/.immich: Error: EACCES: permission denied, open 'upload/thumbs/.immich'
immich| microservices worker error: Error: Failed to write "/thumbs/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
immich| microservices worker exited with code 1
immich| Killing api process
immich exited with code 0
immich| [Nest] 7 - 01/14/2025, 6:47:12 PM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
immich| [Nest] 7 - 01/14/2025, 6:47:12 PM ERROR [Microservices:StorageService] Failed to write upload/thumbs/.immich: Error: EACCES: permission denied, open 'upload/thumbs/.immich'
immich| microservices worker error: Error: Failed to write "/thumbs/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."
immich| microservices worker exited with code 1
immich| Killing api process
immich exited with code 0
I have verified that I can however trick this into working if I use an SMB mount (via Proxmox passed through). So this seems to be a permissions issue on the mount/binding of the external harddrive. What kind of permissions is Immich expecting to be able to write to a mounted directory? How can I set this to match what Immich expects?
15 Replies
Immich
Immich4mo ago
:wave: Hey @Andrino, 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
Andrino
AndrinoOP4mo ago
My docker-compose.yml file. I am using the default one which works perfectly to run the app and have a library of files/thumbs/videos. Below is my environment version of the compose.
services:
immich:
volumes:

# These work perfectly, but I have to move all the files to SMB share, which might cause network slowdown.
# - /mnt/pve/PC-Photos/Immich-backend/thumbs/:/usr/src/app/upload/thumbs
# - /mnt/pve/PC-Photos/Immich-backend/encoded-video/:/usr/src/app/upload/encoded-video

# These are ideal, but aren't working. Immich says "cannot write to .immich" due to permissions issue.
- /mnt/pve/Immich-Thumbs/:/usr/src/app/upload/thumbs
- /mnt/pve/Immich-Transcodes/:/usr/src/app/upload/encoded-video
services:
immich:
volumes:

# These work perfectly, but I have to move all the files to SMB share, which might cause network slowdown.
# - /mnt/pve/PC-Photos/Immich-backend/thumbs/:/usr/src/app/upload/thumbs
# - /mnt/pve/PC-Photos/Immich-backend/encoded-video/:/usr/src/app/upload/encoded-video

# These are ideal, but aren't working. Immich says "cannot write to .immich" due to permissions issue.
- /mnt/pve/Immich-Thumbs/:/usr/src/app/upload/thumbs
- /mnt/pve/Immich-Transcodes/:/usr/src/app/upload/encoded-video
schuhbacca
schuhbacca4mo ago
Running within an LXC is not officially supported. It can and has caused docker issues and can create wonky permission problems. Highly recommend moving to a full VM.
Zeus
Zeus4mo ago
This is 100% due to LXC permission issues, also the issue is worse by ignoring the mount errors, which we do not support either
Andrino
AndrinoOP4mo ago
The ignore actually doesn't change anything, Immich wont start with or without that. It being an LXC issue is interesting, because I am able to get it working with an SMB share just fine. So it seems like I would just need to match the permissions of the mount to what Immich is expecting, to get it to work. Where can I learn more about the permissions that Immich expects?
Zeus
Zeus4mo ago
It expects read and write basically I don’t think the server container even does chown or chmod
Andrino
AndrinoOP4mo ago
I can read/write to it using SSH. So it seems like Immich has a different set of permissions than the mounted folder? The way I understand it, the permissions of the mount are inherited from the host. That's what I think is happening so far, but I'm not sure
Zeus
Zeus4mo ago
Probably. Docker in LXC is pretty cursed
Andrino
AndrinoOP4mo ago
Unfortunately for this situation LXCs are ideal for my setup, so I want to try to figure it out. Is there any linux knowledge you have or maybe some online resource that might help me diagnose?
Zeus
Zeus4mo ago
Not really, no. Proxmox discourages what you’re doing And thus we don’t support it either It’s not technically impossible, which could be somehow worse
Andrino
AndrinoOP4mo ago
I figured I'm probably in a no-mans land. I did follow a guide to get this far with the SMB mount, which gives me hope this could be resolved too for internal mounting. But my linux knowledge is stretched thin by now. So I may have to rethink the process a bit If I were to switch to a VM, do you recommend Ubuntu 24?
Zeus
Zeus4mo ago
Debian or ubuntu is common
Mraedis
Mraedis4mo ago
If you ask me, runtipi is the issue here 👀 install that on a VM instead of an LXC and maybe it will work
Andrino
AndrinoOP4mo ago
Just to FYI for future people if they find this thread: I figured out the best solution for keeping it as an LXC. I made a new Docker LXC as a privileged container, installed only Immich into it, and now mount permissions are no longer an issue. Added bonus of direct GPU access, and isolated backups. Priv. is not ideal, but when it only includes Immich, I'm willing to take that low if any risk.

Did you find this page helpful?