Pure-FTPd - How to recompile (without PAM)

Hello ,

My version of Pure-FTPd is 1.0.21-145.1 (x86_64) on OpenSuSE 11.0

I installed and configured Pure-FTPd with MySQL support and as the documentation says, it’s pretty simple.

I then installed a certificate (not passworded) and bundled it so all the parts were available in the one file for Pure-FTPd. That was fine and I use the certificate for my mail server so I know it’s good. My mail server uses SASL/TLS so I know that part works as well.

I also did a “telnet myURL.com 22” to test the connection and it was fine.

I then took the same FTP client that I tested FTP with and set it to SFTP. Now when I check my server logs it is giving me PAM errors when I have PAM disabled through:

PAMAuthentication NO

Earlier I also installed one of the listed FTP clients from the Pure-FTPd docs. but got the same result.

Just in case it required encrypted passwords I also set: “MYSQLCryt any”, whereas before it was set to “cleartext”. I tested the “any” setting with FTP (21) and it worked fine but still a “no go” on SFTP (22).

The only thing I can think of as a next step is to recompile Pure-FTPd without PAM support because it does say that it is enabled by default when compiled in.

So I made sure I had all the RPM’s for Pure-FTPd which included Pure-FTPd, Pure-FTPd debuginfo, Pure-FTPd debugsource. However, none of these packages as far as I can see have a Makefile and I suspect the debug RPM’s aren’t really meant for recompiling.

So how do you compile Pure-FTPd on OpenSuSE or perhaps a better question, what does this Linux newbie need to learn next to solve this problem?

Thanks in advance,

Hm, I was just informed that OpenSSH is doing the PAM lookup so that answers that. However, on a theoretical level, if I did want to recompile Pure-FTPd, why don’t the RPM’s have all the files to do so? And, what’s the right way to get the files?

Yes, you had the common misconception that SFTP is using the same service as FTP. SFTP actually uses SSH. There is however a secure variant of FTP, called FTPS.

Source RPMs also have dependencies. You may need some development RPMs installed to be able to compile a SRPM. And obviously you need a compiler and common runtime libraries, so those are also dependencies.

Thanks Ken,

Yep, got the compiler, OpenSuSE is good that way as it has always been available.

There is still one piece to this puzzle I don’t understand. Why didn’t OpenSuSE come with an RPM that allows you to rebuild the software?

I ask this because it has been my understanding that one of the fundamental important points about Linux was that you could always tweak and rebuild any software that you had a problem with. However, the first time I set out to do that, I find the RPM’s that come with it don’t have all the files for compiling. Either that or they are there and I just don’t know it but I did look through the install file list and didn’t see any Makefile or other file for compiling. The debug packages do however have the .c and .h files which is to be expected.

I don’t need to compile Pure-FTPd now of course, I ask this for my own understand of Linux, distributions and basically how things work.


They do. They are called source RPMs, or SRPMs as I’ve already explained. You can fetch them from the source repo. They are not included in the media or it would roughly double the amount of space needed. But as required by open sources licenses, all Linux distros give you access to the source package that is used to build the binary package.