-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error importing geodata when running container with a non-root user #5404
Comments
After changing manually the two file permissions in immich-server (less important but for consistency) and immich-microservices the importing of geodata worked.
Restart both containers immich-server, immich-microservices:
|
@zackpollard should we just run this chmod in the base image build? |
Yes. In "Additional information" section I pointed to the Dockerfile and line. |
Yes that makes sense, I'm not really sure why the file is created as 600 by docker at all tbh... Interesting default. |
Maybe there's a user mask somewhere which I cannot see. I will try to provide a PR asap in the base server image repo. |
I am experiencing exactly the same problem on my Synology. Stopped Immich project till fixed. Hopefully very soon... |
Workaround:
|
It seems that Docker ADD URL_SRC DST run with umask 077. I replaced all ADD commands + the RUN command related to geodata into one RUN command, using wget for downloading, with a small improvement on the size of dev base server image: from 2.31 GB to 2.30 GB. The prod base server image is 856 MB, which I think it is the same in both cases (with copy and wget). Please notice that the remote geodata files are dated with today, so probably they changed since the last release. In several minutes I will come with the PR. |
immich-app/base-images#21 should fix this, which will be included in the next Immich release. Please tag me if this persists after the next release has been published. |
Some command to run if k3s is use to fix permission
|
I had the same. And I tried the above work around with the chmod 644 which seems to have fixed the problem for the ASCII file. But now I get the following error:
I tried chmod with 777 and still the same error. Ultimately this may not matter and may be fixed with the next release update. But just thought I'd document this. I'll check again once the next release is out. |
Log into the immich-microservices container with user root: Run this: Post the output you have. The output should look like:
If the output is correct please try to restart immich-microservices container (this is neccessary if you change the files permissions): Check the logs for immich-microservices container: |
The bug
After running the latest version of Immich (v1.89.0) and inspecting the logs of container immich-microservices I get the below error. I usually run containers with a non root user (uid:guid 1000:1000) for security reasons.
This error occurred only with this release.
The OS that Immich Server is running on
Fedora 38
Version of Immich Server
v1.89.0
Version of Immich Mobile App
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
1) Deploy latest release (v1.89.0) 2) Inspected every Immich container logs 3) Catch the error above in immich-microservices container.
Additional information
I logged in immich-microservices container and checked the file permissions.
It doesn't make sense to have the two files above
admin1CodesASCII.txt
andadmin2Codes.txt
non-readable by others.One solution would be to change the permissions of the two files
admin1CodesASCII.txt
andadmin2Codes.txt
, in DockerfileThe text was updated successfully, but these errors were encountered: