Perfect Server Debian Installation - Pureftpd Won't Start

I recently rebuilt the server hosting my website on a different vps host using falko’s "The Perfect Server Debian Lenny (Debian 5.0) With MyDNS & Courier [ISPConfig 3]" and ran into some pretty problematic setbacks. Specifically, pure-ftpd wouldn’t start up. Even more specifically, when trying to start the service, it gives you this fantastically ambiguous error:

Starting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l
mysql:/etc/pure-ftpd/db/mysql.conf -l pam -u 1000 -E -A -b -O
clf:/var/log/pure-ftpd/transfer.log -D -H -B

Give me ambiguity or give me something else, yeah?

Anyways, I’ve experienced this problem two other times. Sadly, both times I forgot where the solution was located on the interwebz. Finally, the third time around I’ve found it again and here we go.

The problem resides in the fact that the server is a vps hosted through either virtuozzo or openvz. Apparently, unless otherwise configured differently, the virtual containers don’t support something that prevents pure-ftpd from starting up. Sorry for the ambiguity, but I’m really not sure what it is. The solution is to build pure-ftpd from source, "without capabilities". Let’s get started Run the command…​

apt-get source pure-ftpd

Once that has been downloaded, change directories into the apt archives directory…​

cd /var/cache/apt/archives/pure-ftpd*

Inside here you’ll find a directory called debian. Run the following command

vi ./debian/rules

add --without-capabilities to optflags in debian/rules

Once you’ve done that, run the following command.

apt-get build-dep pure-ftpd

Annnd another command

dpkg-buildpackage -uc -b

Congradulations! You just built pure-ftpd from source with a custom flag! Now it’s time to install the package. To do this, we’re going to run ANOTHER command (they don’t call it command line for nothing).

dpkg -i ../pure-ftpd-common_1.0.1-8_i386.deb

Finally, run this one last command to install MySql for pure-ftpd so the service can connect to a MySql database where your users and their permissions will be stored.

dpkg -i ../pure-ftpd-mysql_1.0.1-8_i386.deb

And finally you are done. Hopefully this helped some poor lost soul out there besides just mine. If you find any problems or just want to tell the world something, please leave a comment in the comments section (spam bots, you aren’t included in that offer. If you try I will Akismet you!).

Category:Linux

Category:Debian Category:FTP