#Storage Template Not Working

1 messages · Page 1 of 1 (latest)

hollow snow
#

I was forced to redo my immich setup and while re-uploading all the images I noticed the storage template isnt working. It's creating the folders but not moving the files over to the new location.

[Nest] 7 - 09/24/2024, 2:16:36 PM LOG [Microservices:MediaService] Attempting to finish incomplete move: upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/d9/f4/d9f4cbaa-dcf4-4525-a98a-9562d681ae06.mp4 => upload/library/admin/2023/10/ffda3ecd-e969-4329-b40b-436021bd7c7b.mp4 [Nest] 7 - 09/24/2024, 2:16:36 PM LOG [Microservices:MediaService] Found file at old location [Nest] 7 - 09/24/2024, 2:16:36 PM ERROR [Microservices:StorageTemplateService] Problem applying storage template [Nest] 7 - 09/24/2024, 2:16:36 PM ERROR [Microservices:StorageTemplateService] Error: EPERM: operation not permitted, copyfile 'upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/d9/f4/d9f4cbaa-dcf4-4525-a98a-9562d681ae06.mp4' -> 'upload/library/admin/2023/10/ffda3ecd-e969-4329-b40b-436021bd7c7b.mp4' at async Object.copyFile (node:internal/fs/promises:623:10) at async StorageCore.moveFile (/usr/src/app/dist/cores/storage.core.js:160:17) at async /usr/src/app/dist/services/storage-template.service.js:153:17 at async /usr/src/app/dist/repositories/database.repository.js:199:23 [Nest] 7 - 09/24/2024, 2:16:36 PM ERROR [Microservices:StorageTemplateService] Object: { "id": "7affac8b-319a-4dcc-af42-802037ce9fd1", "oldPath": "upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/d9/f4/d9f4cbaa-dcf4-4525-a98a-9562d681ae06.mp4", "newPath": "upload/library/admin/2023/10/ffda3ecd-e969-4329-b40b-436021bd7c7b.mp4" } [Nest] 7 - 09/24/2024, 2:16:41 PM LOG [Microservices:StorageTemplateService] Finished storage template migration

stone pikeBOT
#

:wave: Hey @hollow snow,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have 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)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

stone pikeBOT
hollow snow
devout hazel
#

Error: EPERM: operation not permitted, copyfile 'upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/d9/f4/d9f4cbaa-dcf4-4525-a98a-9562d681ae06.mp4' -> 'upload/library/admin/2023/10/ffda3ecd-e969-4329-b40b-436021bd7c7b.mp4'

#

looks like a file permissions issue

hollow snow
#

But why?

#

it created the folders it created the imgae file.

#

it's running at root as well

devout hazel
#

upload/library/admin/2023/10/ does it have write permissions in this directory?
upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/d9/f4/ and read permissions in this one?

hollow snow
#

That folder is gone so I will use this new one as an example.
"oldPath": "upload/upload/594a75ee-2d69-4ebd-b7c2-f6d8315453e0/e4/ec/e4ece328-b96f-4866-a598-971e0fd6ca39.JPG", "newPath": "upload/library/admin/2024/09/Naftoli Wedding72.JPG"

#

all root and all permissions open.

devout hazel
#

both are the same file system?

hollow snow
#

yup

devout hazel
#

you have free disk space?

hollow snow
#

10tb

devout hazel
#

it sounds like file permissions somehow. I'd dig into it from within the container if nothing else. Sorry not too much help

hollow snow
#

well I did CHOWN root in the container and its still not working

west valve
#

Why would chown root work?

#

If anything that's the thing that's probably the least likely to work

hollow snow
#

I saw a comment in the main chat about switching to unix permissions. I created a new folder and moving the files over. Lets see if that works.

west valve
#

If you want to see what permissions you need, look at the unmodified folders created by the containers

hollow snow
west valve
#

Oh is this a truenas setup

hollow snow
#

yes using docker

west valve
#

Going to defer to the #truenas folks because I have no idea about that

hollow snow
#

Changing to unix permissions fixed the issue.