Synology/ACL Non-root-user support for external (read-only) libraries #6141
Replies: 6 comments
-
https://immich.app/docs/FAQ#how-can-i-run-immich-as-a-non-root-user |
Beta Was this translation helpful? Give feedback.
-
and grant explicit access to the user |
Beta Was this translation helpful? Give feedback.
-
aisbergde, thanks! I found and followed the faq initially to get set up, the non-root section was written over two years ago and before external library support was added (blame FAQ.md) There is a valid use case of mounting external libraries as read-only, this was not considered in the faq then. When a volume is ro mounted with an undeclared bind it is impossible even as root to change the 000 permissions of the mount-point so the mount is inaccessible to a non-root user. Also, even with a rw mount-point, there isn’t any way to in a docker-compose.yml file of opening up the permissions. If a VOLUME is specified in the DockerFile then the mountpoint will carry the DockerFile’s permissions — the existing VOLUME /usr/src/app/upload has permissions 755 as opposed to the DockerFile unspecified mount /usr/arc/app/external which Docker creates with permissions 0. |
Beta Was this translation helpful? Give feedback.
-
I just can say, that my immich runs in docker on a Synology NAS as non root user, but as a dedicated user, and (only) my external libraries are mounted read only and it works. But I needed to grant explicit access for this user to used folders. |
Beta Was this translation helpful? Give feedback.
-
aisbergde — Thanks! My question was about mounting a Synology Even though I had given permissions — and made the user the owner of I ‘fixed’ it by mounting |
Beta Was this translation helpful? Give feedback.
-
Ok! this thread now has a solution, thanks aisbergde for the encouragement. It was a permissions issue, so long as the mount is readable on the host by the non-root user it will work. Below notes for anyone else following up on this: The issue was that Synology NAS use enhanced permissions with access control lists (ACL). For reasons unknown the link between the web DSM controls to set permissions and the actual permissions were broken (possibly to do with a migration of a disk between systems) — this mean the non-root user (immich) was set to Removing Synology Photos, deleting e.g.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
(wow, just found and spun up Immich, what an amazing project moving at breakneck speed!)
TLDR; propose adding “VOLUME /usr/src/app/external” to server/Dockerfile
I found I was unable to run the Immich containers as not-root with an external read only library. This is because the path /usr/src/app/external is not specified as a VOLUME in the server DockerFile. When docker mounts an (unspecified) volume it binds it as owned by root with permissions 000, this makes it unreadable by not-root and because it is read-only it is not possible to even change this with a docker exec -u 0 command.
thanks in advance for any thoughts on this.
Beta Was this translation helpful? Give feedback.
All reactions