How to install proftpd for Sentora on CentOS?

I’ve composed several articles talking about installing proftpd on CentOS. By reading my posts, you should know how to install proftpd with or without Sentora. You should be able to config proftpd to use ssl for secure file transfer.

Thing went well until I had a problem installing Sentora. I installed Sentora on a minimum CentOS7 system. After installing Sentora, I checked its installation log, which showed proftpd was not installed successfully. The failure of installing proftpd is due to the lack of epel-release yum repository on the minimum system.  Proftpd is included in the epel repository. The installation script obviously ignored this error and continued to install other components of Sentora. And the Sentora installation script even created a proftpd configuration file:/etc/proftpd.conf although it did not install proftpd binaries at all.

Of course, I could not start the proftpd service after installing Sentora. What I did was installing proftpd manually:

Unfortunately, I could not start proftpd after the installation. The error is:

mod_dso/0.5: unable to load ‘mod_sql_mysql.c’; check to see if ‘/usr/libexec/proftpd/mod_sql_mysql.la’ exists

fatal: LoadModule: error loading module ‘mod_sql_mysql.c’: No such file or directory on line 38 of ‘/etc/proftpd.conf’

According to this error, I commented the line “LoadModule mod_sql_mysql.c” in /etc/proftpd.conf, and the proftpd service was started successfully. Then I added an ftp account in Sentora’s control panel. But I still could not connect to the ftp server using an ftp client. Using the netstat command, I found proftpd was listening on an ipv6 port instead of the normal ipv4 port. I added a line “UseIPv6          off” in /etc/proftpd.conf to disable ipv6 and restarted proftpd. This time proftpd did listen on ipv4 but the problem persisted. I just could not connect to it through an ftp client. The worst part is I do not know how to locate the log of proftpd and debug the problem. Remember Sentora created the configuration file for proftpd? In that file, Sentora specified several log files in /var/sentora/logs/proftpd/ and /var/log/proftpd/. But the failed connection did not produce any information in those log files.

It turns out the problem is still related with the failure of loading  module ‘mod_sql_mysql.c’. Commenting that line in /etc/proftpd.conf can start proftpd without a problem but cannot make it work properly. Note that although this module is named after mysql but it works well with mariadb which is installed by Sentora on CentOS7. If Sentora were installed correctly, it would install not only proftpd but also proftpd-mysql which acts as a middle component between proftpd and mariadb. In my above steps to install proftpd manually, I did not install the module proftpd-mysql so proftpd did not work properly. The solution is obvious:

yum install proftpd-mysql

 

Posted in tips of hosting