There are many open-source FTP servers available on Linux systems, including Ubuntu. There’s ProFTPd, PureFTPD, VSFTPD, etc. This post shows you how to set up FTP with vsftpd (Very Secure Ftp Daemon). Although this post is tested on Ubuntu 20.04, it should also apply to other versions of Ubuntu and most Linux systems. Also, for students and new users learning Linux, the easiest place to start learning is Ubuntu Linux. Ubuntu is the modern, open-source Linux operating system for desktops, servers, and other devices. To get started with installing and configuring vsftpd, follow the steps below:
How to install vsftpd on Ubuntu Linux
The vsftpd package is available in the Ubuntu repositories. To install it, simply run the following commands: To install vsftpd on Ubuntu, run the commands below. After installing vsftpd, the commands below can be used to stop, start and enable the server service always to start up when the server boots. After installing, you can check vsftpd status by running the commands below: That should display similar lines as shown below:
How to configure vsftpd on Ubuntu Linux
After installing the server, you’ll find its main configuration file at /etc/vsftpd.conf. Many of the settings you’ll configure are well documented there. Run the commands below to open its main configuration file. Then, begin enabling settings that suit your environment.
- FTP access By default, FTP access is granted to the anonymous user only. To grant access to local users only, change the line in the file to match the settings below: To allow local users to upload to the FTP server, and only give them access to upload to their home folders, edit the lines below: Continue below for more configurations.
- Users restrictions If you don’t want all local users with accounts on the system to upload files, then you can limit access to only users that are on the allowed list. This option only allows users who are explicitly specified in the file. Continue below for more configurations
- Secure with SSL certificates If you want to provide encrypted FTP file transmission, you’ll need to include SSL certificates with your setup. You can use existing certificates or create self-signed. For self-signed certificates, run the commands below: The commands will generate self-signed certificate files you can use in your configuration. Open vsftpd default configuration file again and add the lines below referencing the certificates files above. That should encrypt file transmission to the server. At this point, your configuration file should look similar to the one below: Save your changes and restart the server. Continue configuring.
- Setup FTP homes When adding new FTP users, simply create their FTP folders and add them to the file to allow access to the server. Replace the username with the actual user account name. Then add the users to the allowed list.
How to vsftpd server on Ubuntu
Now grab your favorite FTP client (FileZilla) and set up a new site in your site management and use FTP protocol with encryption with explicit FTP over TLS. Type your username and password and connect. You should be prompted with a certificate. accept the certificate and continue. You may check the box at the bottom of the page to trust the certificate so you don’t get prompted in the future. You should now be transferring files securely via SSL/TLS. That’s it! Conclusion: This post showed you how to install and configure vsftpd server on Ubuntu 20.04 | 18.04. If you find any error above, please use the comment form below to report.