Take a look at ncftp
, it comes with an utility (ncftpput
) that can be scripted for this purpose:
$ ncftpput -R ftp.server.com /remote/path /backup
The -R
flag means recursive mode. You can have your authentication details in a separated file. See the manpage (ncftpput(1)
) for details.
Well it's seems we managed to find the problem - and it was, after all, the ASCII-or-binary issue.
When the problem first appeared, we were sending the files to the FTP server via FileZilla with transfer mode "auto". When downloading with FileZilla, the transfer was also set in "auto" and we got problems. The transfer mode used by the browser and by Qt's QNetworkAccessManager is unknown and both were returning with problems.
So my team tested downloading with FileZilla using binary; fail. We then downloaded using ASCII - success. So now we deleted the files in the server and uploaded one of the problematic with ASCII and downloaded it using FileZilla with ASCII as well - success. We then uploaded it using binary and downloaded using binary using FileZilla - success. But when downloading with my Qt-based app - fail. So we guessed that QNetworkAcessManager downloads using ASCII which means either I have to reconfigure it to download as binary or upload the files to the FTP server using ASCII. Since this later option will get me problems when calculating the file size, we are going for the first solution if possible. (We also successfully downloaded with the browser which seems to do it with binary).
So that's it: it seems QNetworkAccessManager downloads using ASCII and, therefore, any file uploaded to an FTP Server needs to be done so in ASCII if that is supposed to be later downloaded using QNetworkAcessManager.
EDIT: A mistake on my part. QNetworkAccessManager actually downloads using binary, not ASCII. This, of course, leads me with having to re-evaluate my interpretation on how to solve the problem, but it is still clear that the ASCII-or-binary is the cause of all the mess.
EDIT 2: Problem solved. Essentially what one has to do is to ensure that the data will be uploaded as binary to the FTP server; since QNAM downloads as binary, the data should be fine. Funny thing is: this seams to only work under Linux. If I run the Qt-based download app in Windows, the problem persists.
EDIT 3: Problem in Windows solved: it was a configuration issue, not related to this problem.
Best Answer
Yes, there needs to be some type of server-side software listening on port 21 to accept the inbound connection and process the data. Not necessarily a daemon, but there must be some type of software to accept the connection.
Debian includes numerous FTP servers in the repositories, which you can search for by using
apt-cache search ftp-server
. ProFTPd and vsftpd are the popular ones that come to mind.You may also need to make modifications to your router to allow the connection through to your Linux host. You can then enter the credentials into Wordpress and have the plugin downloaded from your machine: