The install of ProFTPD on Ubuntu also includes the step to adjust the parameters in the configuration file and deny users list.
As a part of our Server Management Services, we help our Customers to fix FTP related errors regularly.
Let us today discuss the steps to install and configure ProFTPD on Ubuntu.
Install ProFTPD on Ubuntu
Prior to the installation of ProFTPD on Ubuntu, it is important to verify that the system packages are up to date. We could perform this with the help of the update commands below:
$ sudo apt-get update
$ sudo apt-get upgrade
After confirming the status of the packages, we can install ProFTPD with a simple install command given below:
sudo apt-get install proftpd
It install ProFTPD from the Ubuntu repository. The server home directory is at /etc/proftpd and its main configuration file is at /etc/proftpd/proftpd.conf
Configuring ProFTPD
After installing ProFTPD, we need to customize the values in the ProFTPD configuration file. This is at “/etc/proftpd/proftpd.conf”. One could use any of the text editors available like vi or nano to open this file.
We need to customize the parameters given below:
- ServerName: Change it to the default server name.
- UseIPV6: We can switch it to “Off“, if not in use.
- DefaultRoot: Uncomment this line to restrict users with their home folders.
- RequireValidShell: Uncomment this line and make it “On” to enable logging in for users, even for those who don’t have a valid shell in /etc/shells to log in.
- AuthOrder: Uncomment the line to enable the use of local passwords.
- Port: This line defines the default port for the FTP server, it is 21 by default. If you want, you can define any custom port here.
- SystemLog: The default log file path, you may change it if you want.
Once the changes are made, save the changes, and restart the service with the command below:
sudo systemctl restart proftpd
During ProFTPD installation, it creates a default “ProFTPD” user automatically. We’ll need to create a password for it, to do so, run.
$ sudo passwd proftpd
It should now be ready to connect with an FTP client over the server hostname or IP address with the proftpd login.
Further, if we need to deny users access to the FTP server, we can add their names in the /etc/ftpusers. Users in that file won’t have access to the FTP server.
Creating ProFTPD Users
While working with ProFTPD, it is important to create separate users with isolated home directories for security and privacy purposes.
Let us now discuss the steps to create a FTP user “testuser” with the folder “/var/www/” as the home folder.
- To create the user, use the command
$ sudo useradd testuser - Then to set the password for the user, use
$ sudo passwd testuser - To change the home directory of the user, use
$ sudo usermod -m -d /var/www/ testuser
Finally, we need to restart the proftpd service with the command that we saw earlier.
As with any other application, it is possible that you may encounter some error while connecting to FTP. The ProFTPD related errors will be stored at /var/log/proftpd/proftpd.log by default.
[Need any further assistance to install ProFTPD in Ubuntu? – We’re available 24*7]
Conclusion
In short, install of ProFTPD on Ubuntu also includes the step to adjust the parameters in the configuration file and deny users list. Today, we saw how our Support Engineers fix this error.
0 Comments