๐ FTP Server Setup & Configuration on Linux (Complete Guide)
Install, Configure, Secure & Understand FTP (Active vs Passive) in Real-World Linux Environments ย Linux Administration | Networking | Fileโฆ

Image by author
๐ FTP Server Setup & Configuration on Linux (Complete Guide)
*Install, Configure, Secure & Understand FTP (Active vs Passive) in Real-World Linux Environments
- Linux Administration | Networking | File Transfer
๐ What Is FTP?
FTP (File Transfer Protocol) is a standard network protocol used to transfer files between a client and a server over TCP.
- Default Ports
- Control channel: 21
- Data channel: 20 (Active FTP) or High ports (Passive FTP)
๐ฏ What Problem Does FTP Solve?
FTP is used when:
- Files need to be shared between systems
- Large data transfers are required
- Applications upload/download data
- Centralized file repositories are needed
Common real-world use cases:
- Application log sharing
- Media & backup transfers
- Internal file sharing
- Legacy system integrations
๐ FTP vs NFS vs Filesystem

๐ง FTP Applications
Linux FTP Servers
- WUFTP
- VSFTPD โ (Very Secure FTP Daemonโrecommended)
- SFTP (over SSHโmost secure)
- ProFTPD
Windows FTP Servers
- IIS FTP Server
- FileZilla Server
๐ ๏ธ Installing VSFTPD on Linux
yum install vsftpd -y
FTP Root Directories
/var/ftp # FTP root
/var/ftp/pub # Public directory
๐ Verify VSFTPD Installation
rpm -qa | grep -i vsftpd
rpm -qi vsftpd
rpm -ql vsftpd
Important Files

โถ๏ธ Start & Enable FTP Service
/etc/init.d/vsftpd restart
chkconfig vsftpd on
๐ก Starting a service means loading the binary into RAM
๐ฅ FTP User Types
- Anonymous User โ No username/password
- Local User (VLU) โ Linux system users
- Virtual User โ App-specific FTP users
๐ Securing FTP (Disable Anonymous Access)
Backup Config
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.default
Edit Configuration
vi /etc/vsftpd/vsftpd.conf
Recommended Secure Settings
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
local_umask=022
xferlog_enable=YES
xferlog_file=/var/log/xferlog
listen=YES
userlist_enable=YES
tcp_wrappers=YES
Restart service after changes:
systemctl restart vsftpd
๐ซ Block FTP Users
vi /etc/vsftpd/ftpusers
vi /etc/vsftpd/user_list
Add usernames to deny access.
๐ TCP vs UDP (Networking Basics)

๐ Check FTP Port Status
netstat -anp | grep 21
lsof -i :21
nmap -sT localhost
๐ Active vs Passive FTP (Interview Favorite)

๐ด Active FTP
- Client โ Server (21)
- Server โ Client (20 โ high port)
- โ Fails behind NAT/firewalls
๐ข Passive FTP (Default in Linux)
- The clientClient initiates all connections
- Firewall-friendly
- โ Recommended
๐ฅ FTP Client Tools
GUI
- FileZilla (Windows/Linux)
- gFTP
- Kasablanca
CLI
ftp <server-ip>
lftp <server-ip>
Common FTP Commands
mget file # download
mput file # upload
ls
cd
help
๐ Anonymous vs Regular FTP

๐ฅ FTP & Firewall Issues (Real-World)
FTP often breaks due to:
- Dynamic ports
- NAT restrictions
- Active FTP callbacks
โ Solution
- Use Passive FTP
- Allow port ranges in the firewall.
- Prefer SFTP for production
VSFTPD is a stable, secure, and widely used FTP server for Linux. Understanding:
- Active vs Passive FTP
- User types
- Chroot & permissions
- Ports & firewalls
โฆis critical for Linux admins, DevOps engineers, and network engineers.
Thank you..! ๐
๐ If you found this article helpful, click the clap button and drop a comment. ๐ Follow for more DevOps, Linux & Cloud tutorials.
๋ฉํ๋ฐ์ดํฐ
- post_id
- e24328db41db
- slug
- ftp-server-setup-configuration-on-linux-complete-guide-e24328db41db
- url
- https://medium.com/write-a-catalyst/ftp-server-setup-configuration-on-linux-complete-guide-e24328db41db
- canonical_url
- https://medium.com/write-a-catalyst/ftp-server-setup-configuration-on-linux-complete-guide-e24328db41db
- author_url
- https://medium.com/@tushar.jadhav29
- status
- ok
- fetched_at
- 2026-08-31 09:08:38