在 Linux 上查看 FTP Server(如 vsftpd、proftpd、pure-ftpd) 的状态,通常可以从 服务状态、端口监听、进程、日志 几个角度来检查。下面按常见情况说明。
常见 FTP 服务端:
查看是否安装:
which vsftpd
which proftpd
which pure-ftpd
systemctl status vsftpd
或
systemctl status proftpd
systemctl status pure-ftpd
正常示例:
Active: active (running)
service vsftpd status
FTP 默认端口:
netstat -lntp | grep :21
或
ss -lntp | grep :21
示例:
LISTEN 0 32 0.0.0.0:21 0.0.0.0:* users:(("vsftpd",pid=1234,fd=3))
ps -ef | grep ftp
常见进程名:
ftp localhost
或
telnet localhost 21
看到类似:
220 (vsFTPd 3.0.3)
说明服务正常。
tail -f /var/log/vsftpd.log
或
tail -f /var/log/messages
tail -f /var/log/proftpd/
systemctl start vsftpd
systemctl enable vsftpd
如果你愿意,可以告诉我:
我可以给你更精确的命令。