[Question]: Docker MongoDB container "Operation not permitted" error on WSL 2 Windows 11 #2053
-
What is your question?I'm encountering a persistent "Operation not permitted" error when attempting to start a MongoDB container with Docker on Windows 11 using WSL 2. The MongoDB container is set to use a mounted volume from the Windows filesystem ( More DetailsEnvironment
DescriptionI'm encountering a persistent "Operation not permitted" error when attempting to start a MongoDB container with Docker on Windows 11 using WSL 2. The MongoDB container is set to use a mounted volume from the Windows filesystem ( Steps to Reproduce
Expected BehaviorMongoDB container starts successfully, accessing and manipulating data within the specified directory without permission issues. Actual BehaviorMongoDB fails to start, with log output suggesting permission-related errors accessing its data directory mounted from the Windows file system. Additional Context
Given these points, it seems the problem might be related to how Docker/WSL 2 handles permissions for Windows filesystem-mounted volumes, or a specific interaction with the MongoDB container. Any assistance or insights from the community would be greatly appreciated! Thank you! What is the main subject of your question?Installation ScreenshotsCode of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Also observing a similar issues with a similar environment, using the docker-compose.yml as included with the LibreChat repo and its own Environment:
Pulled the following logs out which seem relevant:
|
Beta Was this translation helpful? Give feedback.
-
I am running podman on Windows and had the same MongoDB error:
Its reproducible independent of LibreChat: podman run -d -v ./dn:/data/db mongo mongod --noauth This summary about podman-mongodb helped me understand the situation better. So I was able to make mongodb work with podman run -d --name self_mongodb --userns keep-id -v ./dn:/data/db mongo mongod --noauth I added this to the services:
mongodb:
userns_mode: "keep-id" Unfortunately now LibreChat could not be composed anymore:
But then I found containers/podman-compose#166 and uvx podman-compose --in-pod false up -d |
Beta Was this translation helpful? Give feedback.
I am running podman on Windows and had the same MongoDB error:
Its reproducible independent of LibreChat:
This summary about podman-mongodb helped me understand the situation better. So I was able to make mongodb work with
--userns keep-id
:I added this to the
docker-compose.override.yml
:Unfortunately now LibreCh…