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
- Anonymous — mapped to a system user automatically
- Local — users in
/etc/passwd - 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