I'd like to have an FTP server on a Unix machine that will be able to query a certain API (probably via HTTP or local shell script) in order to authenticate the client.

It would be enough if there is a server that can handle the scenario below:

  1. Client connects via FTP to my server
  2. Client sends the username and password
  3. Server executes a local script with the given parameter
  4. (my custom logic inside the script)
  5. Return a success/failure code/message back to the FTP server

Is there such a server on the market? Or is it possible to customize some of the existing servers to cover the scenario above?

Note 1: I see that vsftpd offers a module for virtual users, but it's not quite clear (to me) how to setup such a module with a custom (eg: HTTP) API

Note 2: There seem to be some ways to build (in C) PAM modules, but I'm hoping for an easier way (that will allow me to configure the authentication mechanism rather than building a C library).

Note 3: In regards to the question being put on hold: please note that this question focuses mainly on a means through which FTP authentication can be achieved using a custom protocol/API. I'm not looking for a specific product, but I'm trying to solve a specific problem. Obviously, a product is needed to implement such a solution since we're dealing with a FTP server.

closed as off-topic by yoonix, Ward, mdpc, womble Nov 10 '15 at 22:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


It seems Pure-FTPD is what you need. Here are two points from their 'About' section seems exactly matching to your needs:

  • Multiple authentication methods can be chained in any order. For instance, SQL accounts, LDAP directories and system accounts can be used at the same time.
  • Custom authentication methods can easily be added. Pure-FTPd supports external authentication modules, and writing a new backend can be as simple as a few lines of shell script.

Further info: https://www.pureftpd.org/project/pure-ftpd

  • Thank you, I'll take a look into Pure-FTPD and I'll come back with a reply if it fits my needs. – Razvan Nov 10 '15 at 22:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.