mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[PR #142] fix: run notebook kernels as the requesting user in multi-user mode #135
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#135
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-terminal/pull/142
Author: @EllaFr
Created: 7/23/2026
Status: 🔄 Open
Base:
main← Head:fix/notebooks-per-user-kernel📝 Commits (1)
65584b1fix: run notebook kernels as the requesting user in multi-user mode📊 Changes
2 files changed (+64 additions, -16 deletions)
View changed files
📝
open_terminal/main.py(+1 -1)📝
open_terminal/utils/notebooks.py(+63 -15)📄 Description
In multi-user mode the file endpoints isolate users through
UserFS, but the notebook endpoints don't apply the same boundary. The kernel is started as the server process rather than the requesting user,create_sessionopens the requested path without theUserFScheck the file APIs use, and sessions are keyed by session id with no owner.Run the notebook kernel as the requesting OS user via
sudo -u(mirroring howcreate_runnerruns commands), so cell code executes with that user's OS permissions rather than the server's. The Jupyter connection file is placed in/tmpand made group-readable to that user so the kernel can read it while the server stays its owner.create_sessionalso validates the notebook path throughUserFS.is_path_allowed, each session is bound to the requestingX-User-Idso execute, status and delete only work for its owner, and the kernel starts in the user's home so relative paths resolve there. Single-user mode is unchanged.Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.