Skip to content

[Notes] Configuring FTP Services on CentOS 7

June 9, 2022

Theory

Active Mode

Client opens ports N (command) and N+1 (data). Client tells server “I opened N+1”. Server connects from port 20 to client’s N+1.

Passive Mode

Client requests PASV mode. Server opens port P and tells client. Client’s N+1 connects to server’s P. Server waits passively.

vsftpd User Types

  1. Anonymous — mapped to a system user automatically
  2. Local — users in /etc/passwd
  3. Virtual (guest) — multiple virtual users mapped to one system user

Configuration

yum install -y vsftpd* ftp*
ftp 127.0.0.1  # anonymous access works after install

Edit /etc/vsftpd/vsftpd.conf:

anonymous_enable=YES   # allow anonymous login
local_enable=YES       # allow local users
write_enable=YES       # allow write (delete, modify, upload, rename)
local_umask=022        # upload file permission mask
Previous
[Notes] Configuring HTTP Services on CentOS 7
Next
[Notes] Configuring DNS Services on CentOS 7