Centos7 mounting vsftpd (centos7 installed ftp)

centos7 install vsftpd

  1. install software

    Install vim and vsftpd

    yum -y install vim vsftpd
  2. Linux environment

    We need to close seLinux

    1. Open selinux configuration file
    vim /etc/sysconfig/selinux
    1. The SELINUX = enforcing changed SELINUX = disabled

    You need to turn off the firewall

    1. Under the firewall open state closed boot from Kai

    systemctl disable firewalld.service
    
    systemctl stop firewalld.service
  3. Profiles

    1. Modify the configuration file

    # 运行
    vim /etc/vsftpd/vsftpd.conf
    # 找到 下面四条语句
    anonymous_enable=YES
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #chroot_local_user=YES
    --------------------
    # 改为 下面四条语句
    anonymous_enable=NO
    ascii_upload_enable=YES
    ascii_download_enable=YES
    chroot_local_user=YES
    
    #最后一行添加
    allow_writeable_chroot=YES

    2. Create user ftp

    # 创建用户
    useradd user1   # 这里的user1是用户名.你可以自定义
    # 修改刚刚创建用户的密码
    echo 123456 |passwd --stdin user1 #设置user1的密码为123456
  4. Configuring vsftpd boot

    # 运行命令
    chkconfig vsftpd on
    # 重启
    reboot

Finally Description

If you press me step by step operation. Then

ftp root directory is / home / user1 /

The public network ip ftp your virtual machine ip

ftp port is 21

ftp account is user1

ftp password is 123456

This tutorial is for virtual machines, servers do not easily test, due to the closure of the firewall.

Guess you like

Origin www.cnblogs.com/RemMai/p/12066148.html