A couple of hosts do not provide FTP access (or only 1 ftp account, like one.com).
Therefor I needed a script that would be able to function as a bridge between my FTP client and the remote server b/c it's very difficult to maintain a site when having only a webbased file editor at your disposal.

First I thought to solve this problem by editing the source code of FileZilla which is in C++ and make it connect to a PHP file that will perform all the needed operations. Eg. the LIST command that is sent by FileZilla to the PHP file will make the script execute a listdir-function.
But due to my C++ skills  being very limited I looked for other possibilities, and ended up on the site of nanoFTPd. NanoFTPd is an ftp daemon written in PHP for unix systems only.
The idea is to let the FTP client connect to a centralized server running a modified version of nanoFTPd. Then nanoFTPd will connect to the server you actually wanted to access. It will fetch the output of, for example: the listdir-command and send it back to the ftp client.

FTP Bridge diagram

"Remote FTP server" in this image, actually stands for the php script that will execute the commands.

At the moment I already have a working version of this script, but it still has to be optimized.

  • There should be made some speed improvements: connecting to a centralized server first which will connect to another server too + fetching and sending the data back ... takes a lot of time! In orde to make this faster I will implement GZip encoding + improve nanoFTPd's code.
  • Compatibility has to be researched: I tested already on two servers which both gave different problems. (Especially with POSIX)
  • The code is messy and definitely needs cleaning up + adding comments.

When all of this is finished, I will offer this as a service: you will be able to connect to your server without needing FTP access, just placing a simple PHP script on your webspace!
The modified version of the script that has to run on a centralised server *might* be released under some kind of license, so you don't have to rely on my server.