Skip to content

LLM cannot create file inside LLM created directory. #70

@nekopep

Description

@nekopep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions