0% found this document useful (0 votes)
49 views1 page

Setup FTP Service On Ubuntu Server

This document provides steps to set up an FTP server on Ubuntu. It involves installing vsftpd and configuring the firewall to allow FTP traffic. It then creates a user directory for FTP with permissions and sample file. The vsftpd configuration file is edited to enable local users, write access, and chroot the user. Finally, a user is added to the userlist file and the vsftpd service is restarted to test the FTP connection.

Uploaded by

Htun Aung Lynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Setup FTP Service On Ubuntu Server

This document provides steps to set up an FTP server on Ubuntu. It involves installing vsftpd and configuring the firewall to allow FTP traffic. It then creates a user directory for FTP with permissions and sample file. The vsftpd configuration file is edited to enable local users, write access, and chroot the user. Finally, a user is added to the userlist file and the vsftpd service is restarted to test the FTP connection.

Uploaded by

Htun Aung Lynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Setup an FTP Server on Ubuntu

Step - 1 (Install vsftpd)


# sudo apt-get update
# sudo apt-get install vsftpd
# sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.original

Step - 2 (Allowing FTP Traffic from the Firewall)


# sudo ufw status
# sudo apt-get install ufw
# sudo ufw enable
# sudo ufw allow OpenSSH
# sudo ufw allow 20/tcp
# sudo ufw allow 21/tcp
# sudo ufw allow 990/tcp
# sudo ufw allow 40000:50000/tcp
# sudo ufw status

Step - 3 (Creating the user directory)


# sudo adduser user1
# sudo mkdir /home/user1/ftp
# sudo chown nobody:nogroup /home/user1/ftp
# sudo chmod a-w /home/user1/ftp
# sudo ls -la /home/user1/ftp
# sudo mkdir /home/user1/ftp/files
# sudo chown user1:user1 /home/user1/ftp/files
# echo "vsftpd sample file" | sudo tee /home/user1/ftp/files/sample.txt

Step - 4 (Configure vsftpd)


# sudo nano /etc/vsftpd.conf
Check the following
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
user_sub_token=$USER local_root=/home/$USER/ftp
pasv_min_port=40000 pasv_max_port=50000
userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO
**save and exit** Ctrl+O Enter Ctrl+X

# echo "user1" | sudo tee -a /etc/vsftpd.userlist


# cat /etc/vsftpd.userlist
# sudo systemctl restart vsftpd

Step - 6 (Testing Connection with FileZilla)


- Open FileZilla and Connect to FTP Server

You might also like