wiki:FTP

Version 2 (modified by krit, 2 years ago) (diff)

--

FTP server

Ref here

  1. install vsftp
    $ apt install vsftpd
    
  2. cp config to backup
    $ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
    
  3. edit config /etc/vsftpd.conf
    listen=YES
    listen_ipv6=NO
    connect_from_port_20=YES
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    chroot_local_user=YES
    allow_writeable_chroot=YES
    secure_chroot_dir=/var/run/vsftpd/empty
    pam_service_name=vsftpd
    pasv_enable=YES
    pasv_min_port=40000
    pasv_max_port=45000
    userlist_enable=YES
    userlist_file=/etc/vsftpd.userlist
    userlist_deny=NO
    
  4. Add the user in existing Linux user to the allowed FTP users list: in ex. allow user demo
    $ echo "demo" | tee -a /etc/vsftpd.userlist
    
  5. restart /etc/init.d/vsftpd restart or systemctl restart vsftpd