Back to blog

FTP vs. SFTP: why files “disappear” in crowded directories

12/7/2025 · 2 min · Infrastructure

Share

If you have ever seen incomplete directory listings in FTP while files still exist on disk, the issue is usually protocol behavior and FTP daemon limits.

The “invisible limit” in FTP

In high-volume folders (logs, massive uploads), FTP clients may return partial lists or hide dotfiles.

Typical reasons:

Verifying with SSH

Shell reads directly from filesystem metadata:

ls

Shows visible files only.

ls -la

Shows hidden files too (.htaccess, .env, and others).

If SSH sees files and FTP does not, the bottleneck is FTP layer behavior.

Why SFTP fixes this

SFTP is not “FTP over SSL.” It is an SSH-based file transfer protocol.

Operational advantages:

  1. Single channel over port 22.
  2. More faithful filesystem view.
  3. Better stability in large directory listings.
  4. Built-in encryption by default.

Quick comparison

FeatureFTPSFTP
TransportTCP (port 21 + data channel)SSH (port 22)
Listing modelFTP daemon dependentSSH subsystem
Hidden filesMay be filteredUsually consistent/available
Large directory reliabilityCan truncateMore robust
SecurityWeak without TLSEncrypted by default

Operational recommendation

  1. Avoid legacy FTP in production.
  2. Use SFTP for daily team/vendor access.
  3. For extreme file counts, generate an index over SSH:
ls -1 > lista.txt

Then transfer the index file.

When files “disappear” in FTP, they often still exist. The listing layer is the problem. Moving to SFTP improves both security and visibility integrity in high-volume server environments.

CC BY-NC

This post is licensed under CC BY-NC.

Comments

Join the discussion below.