I
Immich4mo ago
cproo12

TrueNAS External uploads folder permission issue

Hello, I had immich working perfectly, until I remembered the android app's photo upload feature. I am using an external photo library, and permissions working great there! I don't want images to be uploaded to the pool I left as default for immich (which is located on a 128GB SSD) so I tried adding a folder "uploads" in my image storage pool, then adding the upload_location environment variable or whatever it is, but it still uploaded to the old spot. I gave up trying to modify it, and reinstalled immich and this time set the upload to my TrueNAS host path "uploads", but now it won't boot because of a pretty generic permissions error: "Failed to read upload/upload/.immich: Error: ENOENT: no such file or directory, open 'upload/upload/.immich'" I set up my "uploads" folder the exact same as my regular external library, but it didn't work. Also tried making owner root, with 777 perms, also tried owner apps with 777, no dice. Any help or direction is appreciated.
24 Replies
Immich
Immich4mo ago
:wave: Hey @cproo12, 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. :blue_square: 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
Zeus
Zeus4mo ago
This isn’t a permissions issue. It’s missing a file that it knows was supposed to be in the upload folder You should probably move the folder contents to the new location
cproo12
cproo12OP4mo ago
If this is the first time it booted, am I supposed to manually create the .immich file?
Zeus
Zeus4mo ago
Did you reset the database folder..?
cproo12
cproo12OP4mo ago
This is a fresh install of immich, so yes
Zeus
Zeus4mo ago
You said you had immich working perfectly. So what did you do to make it fresh?
cproo12
cproo12OP4mo ago
I uninstalled the truenas app, deleting all data, and reinstalled the truenas app (not sure if you are familiar with truenas or not) I am very familiar with truenas, and linux, but barely familiar with docker
Zeus
Zeus4mo ago
No but if it’s missing the file it’s likely you didn’t delete all the old files properly It wouldn’t cause that error unless the database knows it was started successfully before
cproo12
cproo12OP4mo ago
No description
cproo12
cproo12OP4mo ago
I think the first case "creating an initial hidden file (.immich) in each folder" is what is causing the crash because I tried crating the file manually, same ownership as parent folder with 777 permissions, and it still did not work
Zeus
Zeus4mo ago
That error looks different
cproo12
cproo12OP4mo ago
let me try again, i'll post the same log what service is preferred for uploading logs here? sorry if its in faq or something
Zeus
Zeus4mo ago
[Nest] 17 - 10/03/2024, 4:08:28 PM LOG [Api:StorageService] Verifying system mount folder checks (enabled=true)
[Nest] 17 - 10/03/2024, 4:08:28 PM ERROR [Api:StorageService] Failed to write upload/encoded-video/.immich: AggregateError: EPERM: operation not permitted, write
[Nest] 17 - 10/03/2024, 4:08:28 PM ERROR [Api:StorageService] The "encoded-video" folder cannot be written to, please make sure the volume is mounted with the correct permissions
api worker exited with code 1
[Nest] 17 - 10/03/2024, 4:08:28 PM LOG [Api:StorageService] Verifying system mount folder checks (enabled=true)
[Nest] 17 - 10/03/2024, 4:08:28 PM ERROR [Api:StorageService] Failed to write upload/encoded-video/.immich: AggregateError: EPERM: operation not permitted, write
[Nest] 17 - 10/03/2024, 4:08:28 PM ERROR [Api:StorageService] The "encoded-video" folder cannot be written to, please make sure the volume is mounted with the correct permissions
api worker exited with code 1
Example You can just attach them
cproo12
cproo12OP4mo ago
Pastebin
2025-01-15 01:15:55.000630+00:00Initializing Immich v1.124.22025-01...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
cproo12
cproo12OP4mo ago
log is probably made a bit weird from truenas, but i am unsure how to access docker image logs, i think that does good enough job displaying the error
Zeus
Zeus4mo ago
it’s what I said. It made the file and now it’s missing The database is somehow persisting
cproo12
cproo12OP4mo ago
Alright sure, let me give it another go removing it Maybe I re-installed before it could finish deleting everything, I did have like 80,000 images in there haha (i didn't delete that many images, but i'm assuming the cache and whatever the heck else probably takes up a good chunk of space)
Zeus
Zeus4mo ago
You can post the database logs from first start. It should initialize the DB
cproo12
cproo12OP4mo ago
from a regular terminal, how would i get those from docker? apologies, i've just never used docker outside of truenas and truenas tries to hide system stuff to make things more simple
Zeus
Zeus4mo ago
docker logs <containername>
cproo12
cproo12OP4mo ago
Uninstalled, gave it 10 minues, reinstalled, working fine now! Although I am not seeing any of the images I upload go into the folder I specified, so not sure what is up with that. Thank you for the quick responses and help @Zeus , appreciate it! 🙂
Zeus
Zeus4mo ago
If you reset it everything needs to be re uploaded
cproo12
cproo12OP4mo ago
I am using an external library I was just testing uploading one image at a time from my mobile phone as a means of transferring it to my server to my temporary uploads directory, then using a regular file manager, organizing it into my external library in other words, I just finished setting up remote machine learning, what a breeze. absolutely kicking butt on my 3090!

Did you find this page helpful?