Allow existing NAS photo read group and reject unreadable catalogs

This commit is contained in:
Pigway
2026-10-05 07:59:48 +08:00
parent 011339d511
commit 763d340e4d
5 changed files with 40 additions and 1 deletions
@@ -157,6 +157,15 @@ class PhotoSources:
"Photo directory is unavailable; check its read-only mount",
404,
)
try:
with os.scandir(directory):
pass
except PermissionError:
raise FlowError(
E.FORBIDDEN,
"Photo directory is not readable; configure the container's existing NAS read group",
403,
) from None
return directory
def headers(self, source):