SadServers
  • Scenarios
  • Labs
    All Labs Linux & Bash Web Servers Databases Data Processing Docker Kubernetes CI/CD Infrastructure as Code Tooling / Applications
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • Documentation
    FAQ Support Pro Accounts Pro+ Accounts Business Accounts Gift API CLI/TUI Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up
  1. Labs
  2. FTP
  3. Cheatsheet

Guide

Concepts and learning path

Troubleshooting

Failure modes and fixes

Cheatsheet

Commands to keep handy

FTP cheatsheet

Service and ports

CheckDescription
systemctl status vsftpdvsftpd service status
ss -tlnp | grep :21Control port listening
ss -tlnp | grep vsftpdPassive data ports in use
grep -v '^#' /etc/vsftpd/vsftpd.confActive vsftpd settings

Interactive ftp client

ftp ftp.example.com # login: user / password ls cd incoming get remotefile.dat put localfile.csv binary # for non-text files passive # PASV mode (default on many clients) bye

lftp (scriptable)

lftp -u user,pass ftp.example.com -e "ls; get file.dat; bye" lftp -u user sftp://host # SFTP — encrypted alternative # Mirror remote dir to local lftp -c "open -u user,pass ftp://host; mirror /remote /local"

curl one-liners

CommandDescription
curl -u user:pass ftp://host/path/file.txt -ODownload file
curl -T local.csv ftp://host/incoming/ -u user:passUpload file
curl -v ftp://host/Verbose — debug PASV/ports

vsftpd — common settings

listen=YES anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES allow_writeable_chroot=YES pasv_enable=YES pasv_min_port=40000 pasv_max_port=40100 # Behind NAT — set public IP clients should use: pasv_address=PUBLIC_IP

Firewall (passive range)

# Example: ufw allow 21, and passive range ufw allow 21/tcp ufw allow 40000:40100/tcp # Test from client curl -v ftp://user:pass@host/

Logs

LocationDescription
/var/log/vsftpd.logTransfers (if xferlog enabled)
journalctl -u vsftpd -esystemd journal
grep vsftpd /var/log/messagesRHEL-style syslog

Secure alternatives (prefer these)

ProtocolPortNotes
SFTP22SSH subsystem — SSH lab
FTPS21 / 990FTP + TLS
HTTPS / S3443Modern B2B APIs

Pro tips

  • Plain FTP leaks passwords — use VPN/private links or migrate to SFTP/FTPS
  • Directory listing hangs? Almost always passive ports or pasv_address
  • Chroot breaks if home dir is writable by the FTP user — check vsftpd docs
  • Finance partners often need fixed IPs, PASV range docs, and ASCII vs binary mode
  • curl -v shows the PASV IP:port the server advertises — verify it is reachable

Practice scenarios

Hands-on FTP scenarios on live Linux VMs: ftp

SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-06-13 16:06 UTC – 2d2950a