[GH-ISSUE #70] LLM cannot create file inside LLM created directory. #44

Closed
opened 2026-10-18 21:10:03 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @nekopep on GitHub (Mar 14, 2026).
Original GitHub issue: https://github.com/open-webui/open-terminal/issues/70

Since I activated multi-user mode on OpenWebUI:

When an LLM uses run_command, all is OK. The LLM can create directories and touch files anywhere. BUT when it uses write_file, each time it fails with

{
"error": "HTTP error 400: {"detail":"[Errno 13] Permission denied: '/home/c0b31e80/base_module/models'"}"
}

Strange thing if it try write_file at root of user directory it works ... :/

Looks like a bug in write_function when trying to write in a subdirectory of user directory.

open-terminal 0.11.16 , openweb-ui 0.8.10

Dockerfile for open-terminal
FROM ghcr.io/open-webui/open-terminal:latest

USER root
RUN apt-get update &&
apt-get install -y python3-pip &&
pip3 install python-docx &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*

USER user

docker-compose.yml:
open-webui:
image: ghcr.io/open-webui/open-webui:0.8.10
container_name: open-webui
privileged: true
volumes:
- ./volumes/open-webui:/app/backend/data
ports:
- 3000:8080
environment:
- 'OLLAMA_BASE_URL=http://ollama:11434'
- 'WEBUI_SECRET_KEY='
- 'OPENAI_API_BASE_URLS=${OPENAI_API_BASE_URLS}'
- 'OPENAI_API_KEYS=${OPENAI_API_KEYS}'
- 'ENABLE_RAG_WEB_SEARCH=True'
- 'RAG_WEB_SEARCH_ENGINE=searxng'
- 'RAG_WEB_SEARCH_RESULT_COUNT=3'
- 'RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10'
- 'SEARXNG_QUERY_URL=http://searxng:8080/search?q='
- 'OPENWEATHER_API_KEY=xxxxxxxx'
- 'CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE=209715200'
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped

open-terminal:
build:
context: .
dockerfile: Dockerfile_open-terminal
container_name: open-terminal
ports:
- 3001:8000
volumes:
- ./volumes/open-terminal:/home/
environment:
- OPEN_TERMINAL_API_KEY=xxxxxxxx
- OPEN_TERMINAL_MULTI_USER=true
deploy:
resources:
limits:
memory: 16G
cpus: "8.0"
restart: unless-stopped

Originally created by @nekopep on GitHub (Mar 14, 2026). Original GitHub issue: https://github.com/open-webui/open-terminal/issues/70 Since I activated multi-user mode on OpenWebUI: When an LLM uses `run_command`, all is OK. The LLM can create directories and touch files anywhere. BUT when it uses `write_file`, each time it fails with { "error": "HTTP error 400: {"detail":"[Errno 13] Permission denied: '/home/c0b31e80/base_module/models'"}" } Strange thing if it try write_file at root of user directory it works ... :/ Looks like a bug in write_function when trying to write in a subdirectory of user directory. open-terminal 0.11.16 , openweb-ui 0.8.10 Dockerfile for open-terminal FROM ghcr.io/open-webui/open-terminal:latest USER root RUN apt-get update && \ apt-get install -y python3-pip && \ pip3 install python-docx && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* USER user docker-compose.yml: open-webui: image: ghcr.io/open-webui/open-webui:0.8.10 container_name: open-webui privileged: true volumes: - ./volumes/open-webui:/app/backend/data ports: - 3000:8080 environment: - 'OLLAMA_BASE_URL=http://ollama:11434' - 'WEBUI_SECRET_KEY=' - 'OPENAI_API_BASE_URLS=${OPENAI_API_BASE_URLS}' - 'OPENAI_API_KEYS=${OPENAI_API_KEYS}' - 'ENABLE_RAG_WEB_SEARCH=True' - 'RAG_WEB_SEARCH_ENGINE=searxng' - 'RAG_WEB_SEARCH_RESULT_COUNT=3' - 'RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10' - 'SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>' - 'OPENWEATHER_API_KEY=xxxxxxxx' - 'CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE=209715200' extra_hosts: - host.docker.internal:host-gateway restart: unless-stopped open-terminal: build: context: . dockerfile: Dockerfile_open-terminal container_name: open-terminal ports: - 3001:8000 volumes: - ./volumes/open-terminal:/home/ environment: - OPEN_TERMINAL_API_KEY=xxxxxxxx - OPEN_TERMINAL_MULTI_USER=true deploy: resources: limits: memory: 16G cpus: "8.0" restart: unless-stopped
Author
Owner

@frenzybiscuit commented on GitHub (Mar 15, 2026):

Image

<!-- gh-comment-id:4063889445 --> @frenzybiscuit commented on GitHub (Mar 15, 2026): ![Image](https://github.com/user-attachments/assets/f24f75b5-c1dc-4ce3-88c0-f7a8a377bc4e)
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/open-terminal#44
No description provided.