This is README.DJ for the ecash-aware FTP server. Copyright (C) 1995 DJ Delorie. All rights reserved. Purchase of this software includes a single unlimited site license. No additional licensing is required. With the exception of source files marked "Copyright Regents of the University of California", redistribution of any of these files is prohibited. Files marked with the RofUC Copyright may be redistributed according to their copyright terms. === Notes on ftpd === files starting with "." don't show up on listings or MGET. sends /etc/ftpissue on initial connection Shouldn't have files beginning with '$' - these are sent directly to the ftp-pay program. Only if the ftp-pay program returns zero does it look for the file of that name. Each CWD command causes the .message file from the new directory to be sent. === Notes on installing === The included charge programs are Perl scripts. To install perl in a chroot'd ftp daemon area, you must copy /bin/perl (or wherever perl lives) to ~ftp/bin/perl. On some systems, you may need to copy additional shared libraries to support Perl itself. For example, on IRIX 5.3 you need to copy libgen.so and libm.so to ~ftp/usr/lib. Install your mtecash program in ~ftp/bin. Run "make install" as root to install the remainder of the programs from this distribution. In ~ftp/etc, edit file ftp-nopay.msg that contains the text to transmit if payment failed. The .mtecash directory should physically live in the ftp server's home directory. The ~ftp/etc/passwd file should have an entry for your shop account, just like the one for the web server, but with the home directory as "/" so that it can find the .mtecash directory. In the eshop's real home directory, add a symbolic link from ~eshop/.mtecash to ~ftp/.mtecash. Create a ~ftp/logs directory owned by your eshop account and mode 700. In this directory will go a file "purchase.log" that records purchases, amounts, times, and the "password" the anonymous user logged in as. You may use this file and a requirement for a valid e-mail account as the basis for support authorization. === Notes on ftp-pay.pl === "RETR $ecash:host:port" sets ecash connection info. Hints stored in $HOME/.mtecash/ftpd-hints/ For each file that you want to charge for, include a .prices file in that directory that contains the price information for that file. Any file not matching an entry in the .prices file will be transferred free of charge. The .prices file contains data like this: file price description Note that "file" can be a wildcard ([]?* supported) (like file.[ch]*). price can be an equation, like these examples, but cannot include spaces: 1.00 one dollar 1+2*m $1 plus $2 per megabyte l(5,g(3,2*k)) $2 per Kb (min $3, max $5) 2*(m-1) $2 per Mb, but first meg ($2) free (price always >0) Available price functions: b k m variables denoting file size (1000 b = 1 k, etc) p(x) x if x>0, else 0. l(x,y) lesser of x or y. (that's an ell, not a one) g(x,y) greater of x or y. t(x,y) 1 if time between x:00 and y:00 (local time), else 0.