ftpq-1.11, 18 March 2007
Configuration updated to get rid of redundant errno function check.
ftpq, release 1.10, 28 July 2001
This is a development release of ftpq, which is a utility for queueing ftp transactions whilst not connected to the network. On connection, ftpq can be invoked in "run" mode to process the jobs automatically.
**** NOTE - THIS RELEASE IS BARELY FUNCTIONAL. SEE THE BUGS FILE!! ****
See the BUGS, CHANGELOG and TODO file, and the COPYING file.
^---------especially this one!!!
Usage
Until I get round to updating the man page and the usage printout, refer to this:
ftpq put [-c config] -h host -u userid [-p passwd] [-a acct] [-d dest-dir]
[-f dest-file] file [files...]
ftpq get [-c config] -h host -u userid [-p passwd] [-a acct] [-d dest-dir]
[-f dest-file] path [paths...]
ftpq del [-c config] -h host -u userid [-p passwd] [-a acct] path
ftpq rmdir [-c config] -h host -u userid [-p passwd] [-a acct] path
ftpq mkdir [-c config] -h host -u userid [-p passwd] [-a acct] path
ftpq run [-v] [-r rate]
You must supply at least host and user ID, plus whatever else is required for login. These may be specified in the config file (see below) rather than on the command line. "path" refers to a full absolute or relative file specification. Relative specifications work from the current directory on the local machine and from the "FTP home" directory on the remote server.
The rate is specified in bytes per second, and limits uploads only. Downloads are processed at full connection speed.
Platforms
Various versions tested on:
- Red Hat Linux 6.1 with a 2.4.7 kernel (glibc2), 486-DX4/120.
- SuSE Linux 4.2 with a 2.0.38 kernel (libc5), 486-DX2/66.
- SunOS 5.5.1 on a sun4u Ultra-Enterprise.
- FreeBSD - included in recent distributions in ports section.
- HP-UX - v0.12 available as a port. One user reported compilation difficulty.
Reported to work on:
- SuSE Linux 7.0
Installation
- Edit src/ftpq.h, and change SPOOLDIR if required. Currently /tmp/ftpq.
- Make sure that this directory exists, with full permissions for users.
- Run "./configure" in the base directory. Try "./configure --help" if you need to set options such as installation directory.
- Type "make" to build the executable.
- Type "make install" to install the program (ftpq) and the man page (ftpq.1). Note that you must have rights to write to the installation directory. You probably want to run "make install" as root.
The intention is that ftpq be run automatically on connection, in the same way that sendmail -q and fetchmail are often run.
To run automatically, find your ip-up.local file (or whatever is run on connection) and add appropriate lines. Mine currently looks like this:
/usr/bin/fetchmail -f /etc/ppp/fetchmailrc
/usr/sbin/sendmail -q
/bin/date > /var/log/ftpqlog
/usr/local/bin/ftpq run -v >> /var/log/ftpqlog
echo -e "\a" > /dev/tty10
This runs fetchmail, sendmail and ftpq sequentially, and beeps when all transfers are complete. The file /var/log/ftpqlog is created on each connection, and has a timestamp and the verbose output of ftpq written to it.
That's it - see the man page for usage details.
Config file
You can set up a config file to store often-used parameters.
Valid switches: -h -P -u -p -a
Section names are enclosed in square brackets. Switches must be specified
as one per line, with a space between the switch and its value. A line
that doesn't match a switch/value pair (a blank line, an invalid switch
or a new section title) marks the end of that section.
- Example
[MyWeb]
-h my.web.server
-u my.login
-p my.password
[WorkFTP]
-h my.work.server
-u work.login
-p work.password
You can then run:
ftpq put -c MyWeb index.html
ftpq put -c MyWeb -d images *.png
ftpq put -c WorkFTP *.dat
Bug reporting
If you come across any bugs, please send me as much detail as you have:
- OS / platform
- Compiler / C library version
- Command line (hide your passwords!)
- Output and error messages
I'm interested in platform-specific compile failures, although you'll probably have to find a solution yourself as I don't have access to many systems.
I'm also interested in suggestions for improvements and potential security holes.
Mark Tranchant
mark@tranchant.co.uk
