FTPMonitor / Guides / SFTP directory listing failed

SFTP directory listing failed

Why SFTP connects but cannot list directories, and how to fix path, permissions, and chroot issues.

Diagnose this automatically

Test whether the server allows directory listing with valid credentials.

terminal
npx ftpmonitor check --protocol sftp --host sftp.example.com --port 22 --username user --password pass --path /upload
Shareable output
terminal
npx ftpmonitor check --protocol sftp --host sftp.example.com --port 22 --username user --password pass --path /upload --format slack --copy

Prefer the browser? Run the same check on the homepage.

If SFTP authentication succeeds but listing fails, it’s usually a permissions or path issue.

Common errors include “Permission denied” or “No such file”.

Common causes

  • Path does not exist (wrong folder)
  • User does not have LIST/READ permissions
  • Chroot/jail limits the visible filesystem
  • Server starts users in a different base directory

Fix checklist

  1. Try listing the default path (`.`) first.
  2. Confirm the expected remote path with the server owner.
  3. Ask the server owner to verify the user has permissions to list/read that folder.
  4. If chroot/jail is enabled, ensure the path is relative to the jailed root.

Quick commands

sftp -P <port> <user>@<host>
pwd
ls -la
ls -la <path>
Related
  • Authentication failedWhy FTP/SFTP authentication fails and how to correct credential, key, and account policy issues.
Diagnostics powered by FTPMonitor CLI