Downloading protected files fails with HTTP 500 instead of requesting sudo
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 60/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
The download endpoint in this plugin's TypeScript backend returns HTTP 500 when SFTP reports Permission denied on read. Find the download handler in the plugin source and compare it with the sudo elevation flow already used by file preview/editing, since the issue asks for the same fallback there. Start by reproducing: read a root-only file via SFTP as a normal user, then wire the sudo authentication flow into the download path and map Permission denied to a meaningful error. Done when sudo-protected downloads work (or a clear permission error is shown) instead of a 500 or a 0-byte file.
由索引模型根据 Issue 内容生成。
描述
What happened?
When downloading a file that requires elevated permissions through Termix File Manager, the download fails with:
Failed to download file: Request failed with status code 500
In some attempts, an empty file (0 bytes) is created instead when SCP Legacy Mode is enabled.
The same protected file can be opened and viewed through the File Manager, but downloading it fails anyways.
OpenSSH logs confirm that the SFTP server rejects the read operation due to insufficient permissions.
Steps to reproduce
- Connect to a Debian 13 server using a regular SSH user with sudo privileges.
- Open Termix File Manager.
- Navigate to a file that is readable by root but not by the SSH user.
- Open the file using the File Manager's existing sudo functionality.
- Attempt to download the same file.
- Observe HTTP 500 or an empty downloaded file.
What did you expect?
When SFTP returns Permission denied, Termix should offer the existing sudo authentication flow and retry the download with elevated permissions.
If sudo elevation is unavailable, Termix should display a meaningful permission error rather than a generic HTTP 500.
Termix version
26.10.5
Plugin version
1.1.1
Environment
Server OS: Debian GNU/Linux 13 (Trixie)
SSH server: OpenSSH with DevSec SSH Hardening
SFTP subsystem: internal-sftp -l INFO -f LOCAL6 -u 0027
MaxSessions: 10
ForceCommand: none
ChrootDirectory: none
LogLevel: VERBOSE
SCP Legacy Mode: Disabled
SSH user: Regular user with sudo privileges
Logs
Anything else?
The issue does not appear to be caused by the SSH hardening configuration. SFTP sessions establish successfully, and the server explicitly reports Permission denied when the protected file is opened for reading.
It would be useful to support sudo-aware downloads consistently with the existing file preview and editing functionality.
Before you submit
- I searched open and closed issues and this is not a duplicate
- I am on the latest version, or I said which version I am on
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 3
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Termix-SSH/Plugin-File-Manager 的其他 Issue
-
bug platform-desktop platform-docker
难度 3/5 1-2 天 新手友好度 55/100
Termix-SSH/Plugin-File-Manager#21 · 2 条评论 ·
-
feature platform-desktop platform-windows
难度 5/5 一周以上 新手友好度 25/100
Termix-SSH/Plugin-File-Manager#3 · 2 条评论 ·
-
feature platform-web
难度 5/5 一周以上 新手友好度 25/100
Termix-SSH/Plugin-File-Manager#5 · 5 条评论 ·
查看 Termix-SSH/Plugin-File-Manager 的全部 Issue
相似的 Issue
-
b:minor bug
难度 2/5 1-3 小时 新手友好度 76/100
software-mansion/argent#1698 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
better-auth/better-auth#12132 · 1 个 reaction ·
维护者通常 1 天内回复
-
automation missing-model model-sync provider:tinfoil
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/models.dev#12053 ·
维护者通常 1 天内回复
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
hurttlocker/o8#5112 ·