fix permission access on prisma migrate in non-root image #13848
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix prisma migrations in non-root Docker image
In
litellm/litellm-proxy-extras/litellm_proxy_extras/utils.py
Line 50 in 0e6e8af
/usr/lib/python3.13/site-packages/litellm_proxy_extras/migrations/
ifLITELLM_MIGRATION_DIR
isn't set to a custom path. Otherwise, prisma migrate would fail with a permission denied error. This happened at least in the non-root Docker image.This PR fixes the issue for the non-root image (didn't check if others need it too!) by making the migrations directory owned by nobody:nogroup (similar to
PRISMA_PATH
). The specific permissions for OpenShift Compatibility are imposed afterwards and should remain unaffected.Relevant issues
#13746
Type
🐛 Bug Fix
Changes
Let
/usr/lib/python3.13/site-packages/litellm_proxy_extras/migrations/
(not hard-coded) be owned by nogroup:nobody, just like/usr/lib/python3.13/site-packages/prisma
.