linux安装vsftpd服务器

    最近看到python的网络编程,看到用python写ftp客户端的小项目,打算着手连连。为了模仿真实环境,我并没有在本机上开个ftp服务器,选择了在虚拟机中的linux中做ftp服务器,我选择了vsftpd。

    用到的命令:

                         service vsftpd start    --启动vsftpd服务

                         chkconfig vsftp on     --设置开机启动ftp服务

    之后要关闭linux上的 iptables 和firewalld 防火墙 :

                         service iptables stop

                         chkconfig iptables off

                         service firewalld stop

                         chkconfig firewalld off

    这时在我的windows 10 本机用filezilla连接ftp服务器成功

    但是我在cmd中尝试通过windows自带的ftp服务对ftp进行操作时,却出现了 200 PORT command successful. Consider using PASV.这种报错,网上查了之后知道原来是linux内核中的selinux在捣鬼。

    查看selinux服务状态:

                         sestatus

     设置selinux开启off:

                         修改vim /etc/selinux/config 文件 :

                         SELINUX=enforcing 改为disabled即可

     此时用默认用户登陆到服务器是可以对上传下载或删除文件的

     对用户的操作不再赘述,深入的linux 服务器操作参考鸟哥网站

                          

                         

posted @ 2018-05-03 14:59  流刃若火  阅读(151)  评论(0编辑  收藏  举报