How to Set Up an FTP Server on Ubuntu Linux

Install the FTP framework

How to Set Up an FTP Server on Ubuntu Linux Picture 1

You need to make sure that the Ubuntu version is the latest. Ubuntu versions 17.10 and above have many different file paths than previous versions, so you need to update to the latest Ubuntu version:

Open Terminal

Enter the command sudo apt-get upgradethen press ↵ Enter.

Enter the password and press ↵ Enter.

Enter ywhen prompted, then press ↵ Enter.

Wait for the upgrade to complete the installation, then restart your computer if prompted.

How to Set Up an FTP Server on Ubuntu Linux Picture 2

Open Terminal. Click the Applications ⋮⋮⋮ menu , scroll down and click the Terminal icon to proceed.

You can also press Alt+ Ctrl+ Tto open Terminal.

How to Set Up an FTP Server on Ubuntu Linux Picture 3

Enter the VSFTPD installation command. Enter the command sudo apt-get install vsftpdinto Terminal, then press ↵ Enter.

How to Set Up an FTP Server on Ubuntu Linux Picture 4

Enter password. Enter the password you use to log in to your computer, then tap ↵ Enter.

How to Set Up an FTP Server on Ubuntu Linux Picture 5

Wait for VSFTPD to install. This process will take about 5-20 minutes depending on your FTP settings and Internet connection, so please be patient.

How to Set Up an FTP Server on Ubuntu Linux Picture 6

Install FileZilla. This is the program that you will use to access and upload data to the server. To install:

Enter commandsudo apt-get install filezilla

Re-enter your password if requested.

Wait for the installation to complete.

Configure the FTP server

How to Set Up an FTP Server on Ubuntu Linux Picture 7

Open the VSFTPD configuration file. Enter the command sudo nano /etc/vsftpd.confand press ↵ Enter. You will need to edit this file to enable (or disable) specific VSFTPD features.

How to Set Up an FTP Server on Ubuntu Linux Picture 8

Allows local users to log in to the FTP server. Use the arrow keys and scroll down to the heading # Uncomment this to allow local users to log in., then remove the "#" sign from the line local_enable=YESbelow.

You can remove the "#" sign by using the arrow keys and selecting the letter before the pound sign (in this case "l") and pressing the key ← Backspace.

Skip this step if the line local_enable=YESdoes not have a pound sign.

How to Set Up an FTP Server on Ubuntu Linux Picture 9

Allow FTP to write commands. Scroll down to the title # Uncomment this to enable any form of FTP write command., then remove the "#" sign from the line write_enable=YESbelow.

Skip this step if the line write_enable=YESdoes not have a pound sign.

How to Set Up an FTP Server on Ubuntu Linux Picture 10

Disable ASCII mangling. Scroll down to the title # ASCII mangling is a horrible feature of the protocol., then remove the "#" sign from the following two lines:

ascii_upload_enable=YES

ascii_download_enable=YES

How to Set Up an FTP Server on Ubuntu Linux Picture 11

Change the "chroot" setting. Scroll down to title # chroot), then add the following lines:

user_sub_token=$USER

chroot_local_user=YES

chroot_list_enable=YES

If any of the lines above already exist, simply remove the "#" sign in front of those lines.

How to Set Up an FTP Server on Ubuntu Linux Picture 12

Change the default "chroot" setting. Scroll down to title (default follows), then add the following lines:

chroot_list_file=/etc/vsftpd.chroot_list

local_root=/home/$USER/Public_html

allow_writeable_chroot=YES

If any of the lines above already exist, simply remove the "#" sign in front of those lines.

How to Set Up an FTP Server on Ubuntu Linux Picture 13

Enable the "ls recursive function" option. Scroll down to the title # You may activate the "-R" option., then remove the "#" sign from the line ls_recurse_enable=YESbelow.

How to Set Up an FTP Server on Ubuntu Linux Picture 14

Save and exit the text editor program. To proceed, you:

Press Ctrl+X

Importy

Press↵ Enter

Add the username to the chroot list

How to Set Up an FTP Server on Ubuntu Linux Picture 15

Open the "chroot" text file. Enter the command sudo nano /etc/vsftpd.chroot_listand press ↵ Enter.

You can skip and go to the last step in this section if you do not need to specify objects to access the FTP server.

How to Set Up an FTP Server on Ubuntu Linux Picture 16

Enter password. Enter the password you use to log into Ubuntu then press ↵ Enter. The "chroot" text file will open.

Skip this step if the system does not ask you to enter a password.

How to Set Up an FTP Server on Ubuntu Linux Picture 17

Add username to the list. Enter your username and press ↵ Enter, then repeat with the usernames whose Home folder you want to access immediately on your server.

How to Set Up an FTP Server on Ubuntu Linux Picture 18

Save the list. Press Ctrl+ X, enter ythen press ↵ Enter. Your list will be saved.

How to Set Up an FTP Server on Ubuntu Linux Picture 19

Restart VSFTPD. Enter the command sudo systemctl restart vsftpdthen press ↵ Enter. VSFTPD will restart to ensure that your changes are saved. You can now access the FTP server.

Access the server

How to Set Up an FTP Server on Ubuntu Linux Picture 20

Determine the server's address. If you purchased an FTP server through a third-party service (for example, Bluehost), you will need to know the service's IP address or physical address to make the connection.

If you are keeping a private server on your computer, you will need your computer's IP address, enter the command ifconfiginto Terminal and see the "inet addr" number in the results.

If "ifconfig" is not installed, you can enter the command sudo apt-get install net-toolsinto Terminal to install it.

How to Set Up an FTP Server on Ubuntu Linux Picture 21

Port forwarding on router . Once you know the server IP address, you need to forward your router's slot 21 port to that address; Make sure this port uses TCP protocol (not UDP or hybrid).

The port forwarding process will vary depending on the router, you should refer to the relevant article or your router's documentation for instructions.

How to Set Up an FTP Server on Ubuntu Linux Picture 22

Open Filezilla. Enter filezillaTerminal then press ↵ Enter. After a moment, FileZilla will open.

If you want to connect through Terminal, you can try entering the command ftp [address]. As long as the FTP server is active and you have Internet access, the system will try to connect to the server; however, you may not be able to upload the file.

How to Set Up an FTP Server on Ubuntu Linux Picture 23

Click File in the upper left corner of the FileZilla window. A drop-down menu will appear.

How to Set Up an FTP Server on Ubuntu Linux Picture 24

Click Site Manager… (Site Manager). This option is in the drop-down menu. The Site Manager window opens.

How to Set Up an FTP Server on Ubuntu Linux Picture 25

Click New Site . This white button is located at the bottom left of the window. The New Site section will open in Site Manager.

How to Set Up an FTP Server on Ubuntu Linux Picture 26

Enter the server address. Enter the address (or IP address) of the FTP server you want to connect to in the "Host:" field.

How to Set Up an FTP Server on Ubuntu Linux Picture 27

Add the port number to be forwarded. Enter 21the "Port:" data field.

How to Set Up an FTP Server on Ubuntu Linux Picture 28

Click Connect . This red button is at the bottom of the page. FileZilla will connect your computer to the FTP server.

How to Set Up an FTP Server on Ubuntu Linux Picture 29

Transfer files to the server. You can drag the folder in the left window and drop it into the right window to upload data to the FTP server site.

4 ★ | 1 Vote

May be interested

  • Is CentOS or Ubuntu the best web hosting server operating system?Is CentOS or Ubuntu the best web hosting server operating system?
    with so many available linux distributions, choosing a suitable distro for your home computer is not easy. choosing a linux distribution for the server is even more difficult.
  • Ubuntu Server Upgrade StepsUbuntu Server Upgrade Steps
    ubuntu also constantly updates itself with newer versions. if you're using the desktop, you'll be prompted when an update is available and receive instructions on the process. however, on the server, you may not have this privilege. so updating ubuntu server will involve running a few command lines.
  • 8 ways Ubuntu changes and improves Linux8 ways Ubuntu changes and improves Linux
    ubuntu is the most prominent linux distribution in the world. ubuntu and its developer, canonical, have been plagued by a lot of fuss over the years, but the linux world is getting much better thanks to both.
  • Tips and tricks after installing UbuntuTips and tricks after installing Ubuntu
    ubuntu is one of the completely free open source operating systems. this is a distribution (distro) of linux with the second highest amount of traffic after linux mint.
  • Is Arch Linux better than Ubuntu?Is Arch Linux better than Ubuntu?
    arch linux and ubuntu are two big names in the linux world. both have a huge fan base, with two completely opposite positions.
  • Distinguish Ubuntu and Linux MintDistinguish Ubuntu and Linux Mint
    linux is an open-source operating system and anyone can edit and customize to their liking, ubuntu and mint are the two operating systems born from that.
  • How to set up your own Git server on LinuxHow to set up your own Git server on Linux
    while you can count on globally renowned git hosting services like github, in some cases it is better to host a personal git server for enhanced privacy, customizability, and security.
  • Following many other Linux employees, Ubuntu stopped providing 32-bit ISO ImagesFollowing many other Linux employees, Ubuntu stopped providing 32-bit ISO Images
    ubuntu declares that it will stop providing the iso installer for os that the new version starting with ubuntu 17.0 (artful aardvark) will be released on october 19.
  • How to install fcgiwrap for Nginx on Ubuntu 20.04How to install fcgiwrap for Nginx on Ubuntu 20.04
    fcgiwrap is a simple server used to run cgi applications via fastcgi. we can use it to provide clean cgi support for nginx webserver. here's how to install fcgiwrap on ubuntu 20.04.
  • 7 best antivirus programs for Ubuntu7 best antivirus programs for Ubuntu
    viruses can still be spread, especially if you have a samba server (to share windows files on linux) or external devices often interact with both linux and windows.