| | 1 | = FTP server = |
| | 2 | |
| | 3 | Ref [https://linuxhint.com/setup-vsftpd-ftp-server-on-debian10/ here] |
| | 4 | |
| | 5 | 1. install vsftp |
| | 6 | {{{ |
| | 7 | $ apt install vsftpd |
| | 8 | }}} |
| | 9 | 2. cp config to backup |
| | 10 | {{{ |
| | 11 | $ sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig |
| | 12 | }}} |
| | 13 | 3. edit config /etc/vsftpd.conf |
| | 14 | {{{ |
| | 15 | listen=YES |
| | 16 | listen_ipv6=NO |
| | 17 | connect_from_port_20=YES |
| | 18 | anonymous_enable=NO |
| | 19 | local_enable=YES |
| | 20 | write_enable=YES |
| | 21 | chroot_local_user=YES |
| | 22 | allow_writeable_chroot=YES |
| | 23 | secure_chroot_dir=/var/run/vsftpd/empty |
| | 24 | pam_service_name=vsftpd |
| | 25 | pasv_enable=YES |
| | 26 | pasv_min_port=40000 |
| | 27 | pasv_max_port=45000 |
| | 28 | userlist_enable=YES |
| | 29 | userlist_file=/etc/vsftpd.userlist |
| | 30 | userlist_deny=NO |
| | 31 | }}} |
| | 32 | 4. Add the user to the allowed FTP users list: in ex. allow user '''demo''' |
| | 33 | {{{ |
| | 34 | $ echo "demo" | tee -a /etc/vsftpd.userlist |
| | 35 | }}} |
| | 36 | 5. restart /etc/init.d/vsftpd restart or systemctl restart vsftpd |