看了很多配置vsftpd的教程,但是首先还是明确环境的差异,可能并不是完全适用自己的情况。我是在centos7上安装vsftpd(VSFTPD stands for Very Secure FTP Daemon),然后服务器是连到一个路由器的接口上的,路由器相当于一个小型的局域网,然后通过这台服务器搭建一个ftp服务器,只是划分一部分的存储做这个ftp服务器,服务器上有很多本地用户。
第一步 安装vsftpd
yum install vsftpd
安装完成以后是需要手动打开的,并且设置开机自启动
systemctl start vsftpd
systemctl enable vsftpd
为了可以从外网中登录ftp,还需要在防火墙中打开21
号端口,和ftp服务。在centos7中,内置的防火墙已经从iptables变成了firewalld。
这个博客讲了一些防火墙的知识
firewall-cmd --zone=public --permanent --add-port=21/tcp
firewall-cmd --zone=public --permanent --add-service=ftp
firewall-cmd --reload
第二步 配置vsftpd
首先我们备份一下配置文件
cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.orig
待补充。。。
https://www.unixmen.com/install-configure-ftp-server-centos-7/
http://www.cnblogs.com/chenmh/p/5365274.html
https://www.cnblogs.com/ismallboy/p/6785270.html
https://www.tecmint.com/install-ftp-server-in-centos-7/
查看服务器端口
http://www.cnblogs.com/kerrycode/p/5609010.html
ftp命令使用
https://www.cnblogs.com/mingforyou/p/4103022.html
ftp防火墙端口开放
https://blog.csdn.net/u011846257/article/details/54707864
https://blog.csdn.net/xlgen157387/article/details/52672988
FTP - 550 Failed to change directory
https://stackoverflow.com/questions/34736743/ftp-550-failed-to-change-directory
Filezilla FTP Server Fails to Retrieve Directory Listing
https://stackoverflow.com/questions/24566692/filezilla-ftp-server-fails-to-retrieve-directory-listing
https://segmentfault.com/a/1190000008161400
What are the settings to correct vsftpd “500 OOPS: cannot change directory” error?
https://unix.stackexchange.com/questions/79743/what-are-the-settings-to-correct-vsftpd-500-oops-cannot-change-directory-erro?rq=1