Downloading protected files fails with HTTP 500 instead of requesting sudo
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 60/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 3
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Termix-SSH/Plugin-File-Manager
-
bug platform-desktop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Termix-SSH/Plugin-File-Manager#19 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Termix-SSH/Plugin-File-Manager#17 · 1 bình luận ·
-
bug platform-desktop platform-docker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Termix-SSH/Plugin-File-Manager#16 · 2 bình luận ·
-
bug platform-desktop platform-docker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Termix-SSH/Plugin-File-Manager#15 · 2 bình luận ·
-
Unable to start subsystem: sftpĐang mởbug platform-docker
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Termix-SSH/Plugin-File-Manager#18 · 1 bình luận ·
Tất cả issue của Termix-SSH/Plugin-File-Manager
Issue tương tự
-
area:plugins area:security area:skills bug has repro
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anthropics/claude-code#105911 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Fission-AI/OpenSpec#2165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐞 bug 🧐 unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Tencent/tdesign-vue-next#7032 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gnosis/gnosis_vpn#661 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Đang mởtriage:bug-verified
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày