Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Downloading protected files fails with HTTP 500 instead of requesting sudo

Aperta
#14 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
60/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
  1. Connect to a Debian 13 server using a regular SSH user with sudo privileges.
  2. Open Termix File Manager.
  3. Navigate to a file that is readable by root but not by the SSH user.
  4. Open the file using the File Manager's existing sudo functionality.
  5. Attempt to download the same file.
  6. 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
Lingua principale
TypeScript
Stelle
1
Fork
3
Merge medio
1g 4h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Termix-SSH/Plugin-File-Manager

Tutte le issue di Termix-SSH/Plugin-File-Manager

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.