Enabling FTP on Ubuntu 22.04 LTS
Install the FTP Server, For this example, we'll use vsftpd
, a popular and secure FTP server
Set up an FTP server using vsftpd
Bash
# Update Package Lists
$ sudo apt update
# Install the FTP Server
$ sudo apt install vsftpd
# Start and Enable the FTP Service
$ sudo systemctl start vsftpd
$ sudo systemctl enable vsftpd
Configure the FTP Server
Edit the vsftpd
configuration file
Adjust the following settings:
Text Only
# Disable Anonymous Access
anonymous_enable=NO
# Allow Local Users to Log In
local_enable=YES
# Enable File Uploads
write_enable=YES
# Restrict Users to Their Home Directories
chroot_local_user=YES
Save the file and exit (:wq).
Restart the FTP Service
Apply the changes by restarting the vsftpd
service:
Configure the Firewall (if applicable)
Allow FTP traffic through the firewall:
Test the FTP Connection
Use an FTP client or the command-line tool to test the connection. For command-line testing:
Replace <server_ip_address>
with your server’s IP address.
Or using the FTP client: FileZilla Client