Open niekbruggeman opened 2 weeks ago
I found out that after creating the file manually the error message changed fom "Failed to read" of "Failed to write"
created the file with the following command: touch encoded-video/.immich
[Nest] 3654 - 11/04/2024, 1:42:47 PM ERROR [Api:StorageService] Failed to read /share/immich/encoded-video/.immich: Error: ENOENT: no such file or directory, open '/share/immich/encoded-video/.immich'
[Nest] 3621 - 11/04/2024, 1:42:40 PM ERROR [Api:StorageService] Failed to write /share/immich/encoded-video/.immich: Error: EACCES: permission denied, open '/share/immich/encoded-video/.immich'
i'm a liitle further.
i ran "chown -R 1000:1000 media/immich/ " that did not solve the issue.
But when i set PUID 0, PGID 0 in the configuration options the addon started and the folder sturcture is made automatically.
Hi thanks for the coffees! I have a big week at work and will look in a couple days! Nice investigational process so far
I've had the same issues that last few days and might have to add something. What I noticed is that on a fresh DB if you run the add-on it will create the proper file structure on the local ha drive. Anyways this is not working for the share drive. If you change the location afterwards to another folder on the local ha drive, you receive the exact same error again.
You could try :
You could try :
- make sure all hidden files have the right permissions
- go within the container from immich, going to the path, and checking that it actually sees the right ownerships (perhaps the way HA mounts the cifs prevents the ownerships to be rightly used)
- make sure that the parents folders also are owned by 1000:1000
- login within the container using 1000:1000 user and recreating the folders
1st bullet - I did, all files and folders are owned by 1000. 2nd - dont know how to do that. 3rd - done, see bullet 1. 4rd - done, same issue.
Reacting to "TScj92", I'm using the same database time after time. I do not throw away the database and start over. I cant test it verry easy now everything is up and running now.
To be totally clear. Im now running the addon with PUID 0 and PGID 0. This works supposably well. I'm not sure what the impact is of running the addon this way..
Honestly not much in my opinion, I'm running all my addons as root on my system. The most important element that I see is to prevent the app from accidentally accessing & modifying stuff it shouldn't. But you can control that by selecting what data you mount in HA. The other element about data safety (avoiding the app to "check" your files) is a bit moot as anyway all containers runs as root ; only the app itself (so immich) is run with a different user.
Well the most important is that it's working for you!!
@niekbruggeman are you connecting to a share with or without password? Are you using cifs? Even with the settings you recommended I can't get it to create folders on the share
@niekbruggeman are you connecting to a share with or without password? Are you using cifs? Even with the settings you recommended I can't get it to create folders on the share
I'm using CIFS protected with username and password. Did you try running the container with PUID 0 and PGID 0 ? Did you try with a new/empty database ?
I've same issue. If I create a new immich installation in the local default HA folder, works fine. But didn't work with shared folder SAMBA CIFS with NTFS or exFAT mounts. same error
Description
Hi Alex and developers, I bought you two coffee so that you have something to drink while looking into my issue.
I am having trouble with a fresh install of the Immich-addon (v1.119.1) within my HA instance (latest stable). After setting up the required configuration options, I get the following error I'm not able solve.
\share\immich is a CIFS share mounted on my synology NAS. When i start the addon the share is empty, containing no folders and no files. After starting the addon, i see one folder \library is automatically created by the addon.
I double and triple checked the access-rights of the addon and on the file share. The addon is running with the highest privileges, and the user used for mounting the share is owner of the mounted share having full read and write access on files folders an sub files and folders. I can only assume where are sufficient write privileges as the \library folder is created by the addon.
While searching for the error i found that there was a similar issue with v1.115.0 last month. https://github.com/immich-app/immich/discussions/12798 The solution there was to create the necessary folder structure and .immich files by hand. This was not a solution in my situation with the addon. (used folder stucture below)
Then I tried placing the data_location: not on a mounted drive, but on local storage of my HA instance. I set data_location: \media\immichlocal. This resulted in the same behavior.
As you can see, only the folder \library is created. And the error remains. I'm unable to start the addon.
As last resort I tried installing the official docker image (in a totally different docker-contrainer manager, not as an addon) and mounting the same location. I ran into the same issue, but with the official docker image I was able to workaround the error by creating the folder structure by hand als below (as mentioned in /discussions/12798) .
After creation the structure the docker image in de containermanager started and functioned like supposed. Like i mentioned above, this was not a workaround with the immich addon from your repository.
With the most basic installation and new installation from scratch, I'm not able to successfully start the addon. So there for i reported a bug, but it is always possible that i'm doing something wrong.
Please advise. Thanks in advance. I will reply on questions and reportback test results ASAP.
Reproduction steps
Addon Logs
Architecture
No response
OS
No response