Ubuntu 26.04

FTP : Install Vsftpd2026/06/01

 

Install Vsftpd to configure FTP server to transfer files.

[1] Install and Configure Vsftpd.
root@www:~#
apt -y install vsftpd
root@www:~#
vi /etc/vsftpd.conf
# line 31 : uncomment
write_enable=YES

# line 122, 123 : uncomment (enable chroot)
# and add the line to enable writable under the chroot directory
chroot_local_user=YES
chroot_list_enable=YES
allow_writeable_chroot=YES

# line 125 : uncomment (enable chroot list)
chroot_list_file=/etc/vsftpd.chroot_list

# line 131 : uncomment
ls_recurse_enable=YES

# add to last line : specify chroot directory
# if not specified, users' home directory equals FTP home directory
local_root=public_html

root@www:~#
vi /etc/vsftpd.chroot_list
# add users you allow to move over their home directory

ubuntu
root@www:~#
systemctl restart vsftpd

[2] If UFW is enabled, fix the PASV ports and allow FTP services and the PASV ports.
root@www:~#
vi /etc/vsftpd.conf
# add to last line
pasv_enable=YES
pasv_min_port=60000
pasv_max_port=60100

root@www:~#
systemctl restart vsftpd

root@dlp:~#
ufw allow ftp

root@dlp:~#
ufw allow ftp-data

root@www:~#
ufw allow 60000:60100/tcp

Rule added
Rule added (v6)
Matched Content