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:
- recursion/memory/list limits configured on FTP daemon
- hidden files filtered by policy
- long data-channel listings interrupted
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:
- Single channel over port 22.
- More faithful filesystem view.
- Better stability in large directory listings.
- Built-in encryption by default.
Quick comparison
| Feature | FTP | SFTP |
|---|---|---|
| Transport | TCP (port 21 + data channel) | SSH (port 22) |
| Listing model | FTP daemon dependent | SSH subsystem |
| Hidden files | May be filtered | Usually consistent/available |
| Large directory reliability | Can truncate | More robust |
| Security | Weak without TLS | Encrypted by default |
Operational recommendation
- Avoid legacy FTP in production.
- Use SFTP for daily team/vendor access.
- 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.
This post is licensed under CC BY-NC.
Comments
Join the discussion below.
Comments are not configured yet. Add Cusdis settings in /assets/json/config/blog-comments-config.json.