Skip to content

Conversation

@etnoy
Copy link
Collaborator

@etnoy etnoy commented Feb 6, 2025

Description

This fixes the bug where any permission denied error in a library scan cancels the entire scans and throws an error. Instead, we ignore permission errors and warn in the console.

There are several bugs reporting this, including #11177 and this reddit thread: https://www.reddit.com/r/immich/s/A1Qf7tSI7F

How Has This Been Tested?

Added e2e test for the specific case. In order to make the docker be able to get permission errors, I added DAC_OVERRIDE as a capability drop.

In case of permission error, we now get a warning in the log:

image

Caveat

The upstream PR is not merged yet, therefore this PR is a draft for now: mrmlnc/fast-glob#485

@etnoy etnoy force-pushed the feat/ignore-library-permission-error branch from 224f4e5 to 43d66c7 Compare February 6, 2025 23:30
"cookie-parser": "^1.4.6",
"exiftool-vendored": "^28.3.1",
"fast-glob": "^3.3.2",
"fast-glob": "github:etnoy/fast-glob#built",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to patch this, lets do it in the immich-app repo. If this is the way we want to go we can create that fork.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to do that. I've waited for weeks to get any response on my PR so I think it's time to fork

@zackpollard
Copy link
Member

I'm still unsure generally if this is the right way to go. At least if the scan fails fully, people are more likely to notice the problem, whereas people rarely check their server logs...

@etnoy
Copy link
Collaborator Author

etnoy commented Mar 6, 2025

I'm still unsure generally if this is the right way to go. At least if the scan fails fully, people are more likely to notice the problem, whereas people rarely check their server logs...

I agree with the last part, but that is a problem we have in general. In the future we'll have to look at some way to bring errors forward from the log to the frontend in some way.

In my opinion, it is not a good thing that a single folder with lacking permissions among thousands of others causes the whole scan to fail. If we look at other applications like, for instance, plex, they don't error out in this case either.

I do still think this is the right way to go, but I'm open to other ideas.

@zackpollard
Copy link
Member

zackpollard commented Jun 12, 2025

We have notifications now, if we still want to do this, lets surface it through that interface. Going to close this for the moment, please reopen if you do end up making those changes 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants