From 5d372096c99f760fa10f7a52bb4d23e09910df92 Mon Sep 17 00:00:00 2001
From: hsn <>
Date: Wed, 10 Sep 2003 09:57:34 +0000
Subject: [PATCH] Initial revision
---
INFO | 160 ++++++++
INSTALL | 162 ++++++++
MACHINES | 12 +
doc/HISTORY | 606 +++++++++++++++++++++++++++
doc/faq.html | 1106 ++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 2046 insertions(+)
create mode 100644 INFO
create mode 100644 INSTALL
create mode 100644 MACHINES
create mode 100644 doc/HISTORY
create mode 100644 doc/faq.html
diff --git a/INFO b/INFO
new file mode 100644
index 0000000..66b3d88
--- /dev/null
+++ b/INFO
@@ -0,0 +1,160 @@
+ Interested parties about FSP please email
+ to Radim Kolar
+ hsn at cybermail.net
+ visit our homepage on
+ http://fsp.sourceforge.net/
+ and join us!
+
+ For more than 7 years benefits of FSP protocol were unnoticed
+ and FSP software was not maintained...
+
+ FSP today
+ Written by Radim Kolar
+
+ FSP uses UDP datagrams and it is reliable even when there is high
+ number of packet loss. It is usable on WiFi network with 60% packet
+ loss.
+
+ Unlike TCP, FSP has a fast restart when line comes up.
+
+ FSP server do not sends any data out unless is asked for. This
+ solves problem with transfering duplicate data when using
+ TCP protocol on overloaded lines. About 30% are dupes, thrown
+ out by client.
+
+ UDP ports are not often port scanned today. Nobody notice that
+ you are running a server.
+
+ FSP uses UDP which is unnoticed by many firewalls. FSP server
+ runs on 21 port by default, if you move it to port 53 (dns)
+ even strictly configured firewall can be worked around.
+
+ You want to run anonymous archive and want to keep lamers out.
+
+ You want to share something without ruining your valueable bandwidth.
+
+ You have overloaded archive site.
+
+ You do want to share large data files (movies, ISO images) on
+ slow (or you do not want to waste valuable bandwidth) lines.
+ Ideal for sharing files on modem lines.
+
+ FSP daemon is a very light server.
+
+ What is the purpose of FSP (V2.8.1):
+
+ Written by A.J.Doherty@reading.ac.uk
+
+ FSP is a set of programs that implements a public-access archive
+ similar to an anonymous-FTP archive. It is not meant to be a
+ replacement for FTP; it is only meant to do what anonymous-FTP
+ does, but in a manner more acceptable to the provider of the
+ service and more friendly to the clients.
+
+ Providing anonymous-FTP service can be costly --- each active
+ session consumes one process slot in the OS and one stream socket
+ entry in the network sub-system. The servers can also run
+ concurrently, adding to the system load. A popular archive site
+ can easily be overwhelmed as a result. Some were forced to
+ shutdown and some impose inconvenient access restrictions.
+
+ Unlike FTP, FSP is connection-less and virtually state-less. One
+ server handles requests from all clients machines. Each active
+ client machine takes up 16-bytes in a dynamically extensible
+ table. Since only one server exists on a server machine at any
+ time, the load added to the server machine is no more than one.
+
+ In exchange for allowing site operators to keep their sites open
+ and do away with cumbersome access restrictions, this is what the
+ clients accept with FSP:
+
+ 1) Lower transfer rate. The maximum rate is 1 kbyte per UDP
+ message round-trip time between the client and the server.
+
+ In addition to the potential for more abundant sites and more
+ accessible sites, this is what the clients gain with FSP:
+
+ 1) Robustness. Since FSP is connectionless, fluctuations in
+ the network will not abort a FSP transaction. Furthermore,
+ the 16-bytes of data for each client can be regenerated at
+ any point during any transaction. Thus, if the server goes
+ down at any point during a transaction, the transaction will
+ resume when the server is restarted. (like NFS)
+
+ 2) Friendlier user interface. FSP does not have its own command
+ interpretor like FTP. Since it is connectionless, there is
+ no reason to carry much information from one command to the
+ next, and the commands can all be made into individual Unix
+ programs. For instance, there is one program you run to list
+ the directory and another you run to download a file.
+
+ 3) Client protection. FSP oversees a directory structure similar
+ to that of an anonymous-FTP. However, a directory created
+ via FSP transaction is owned by the client machine that issued
+ the creation request. The client can create and delete files
+ and subdirectories in that directory. In addition, the client
+ can enable any of the four attributes for that directory:
+
+ A) Give all other clients the permission to create files.
+
+ B) Give all other clients the permission to delete files
+ or subdirectories.
+
+ C) Give all other clients the permission to read files.
+ (this is true by default)
+
+ D) Give all other clients the permission to create sub-
+ directories.
+
+ Note: A subdirectory can be deleted if it is empty and the
+ client owns the subdirectory.
+
+ 4) Server protection. FSP server does not spawn sub-programs.
+ It will accept only paths that are downward relative to its
+ designated working directory. On systems with symbolic links,
+ the server will follow symbolic links, but it does not follow
+ uplinks (".."). Clients cannot create symbolic links and
+ care should be taken so that other users on the server machine
+ cannot create symbolic links in the server's work space.
+
+ It is also fairly difficult to formulate an attack to force a
+ shutdown of a FSP site by actions of a rogue site. About the
+ only way to disrupt a FSP service is to flood the FSP site
+ with network packets. FSP server prevents itself from
+ 'counter-flooding' by filtering for legitimate requests using
+ the following method:
+
+ A) Each request message contains a key. For each client,
+ server database contains the keys to be used for the
+ next client request and for the previous client request.
+
+ B) If the next request does not contain a key that matches
+ either of the two keys, it is accepted only if at least
+ one minute has elapsed since the last time a request
+ is accepted. If the key does match the old key
+ (retransmit by client) it is accepted if the elapse time
+ is greater than 3 seconds.
+
+ C) Every request message accepted is acknowledged with
+ one reply message. The reply message contains a new
+ key to used for the next request. The new key is
+ computed by the server with a pseudo-random number
+ generator.
+
+ Flooding is a blatant violation of network etiquette because
+ a site can be subjected to flooding attack whether it has FSP
+ running or not, and flooding congests every link and gateway
+ between the rogue client and the server. As a further measure
+ of protection, the server loads a table of rogue clients on
+ startup. The server will not respond to requests from any of
+ those clients.
+
+ ***********************************************************************
+
+ This is a free software. Be creative; make your own macros and tools
+ and let me know of any bugs and suggestions.
+
+ ***********************************************************************
+
+ Source code uses several BSD-like licenses; Whole FSP is distributed
+ under 2-point BSD license, also known as MIT X11 License.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..333a446
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,162 @@
+Compilation:
+ The first step in running this fine software (:) is to get it to
+ compile. Every effort on my part will be made to make this code
+ compile and run on any reasonable system. The information in this
+ file CURRENTLY pertains only to Unix and Cygwin users.
+
+ The first step is to run the configure script provided in this
+ directory. This will generate a good makefile and a file called
+ tweak.h in the include directory. These files are vital for the
+ compilation of the system.
+
+ You must also edit the files include/client_conf.h and
+ include server_conf.h as they contain parameters which must
+ still at this point be manually set by the person compiling
+ the code.
+
+>> By default, the configure script will set up the Makefile
+>> to install the code in /usr/local/bin and the man pages under
+>> /usr/local/man. If you wish to change this, you MUST run
+>> configure with the --prefix option. For instance, on my
+>> machine, I install the files under /usr/jt/bin and /usr/jt/man.
+>> To do this, I type configure --prefix=/usr/jt
+
+ At this point, you should just be able to type 'make'
+ and then 'make install'. This will compile and (if
+ you do an install) install the clients in the directory specified
+ by you in the Makefile. You may also wish to type
+ 'make install-man' if you wish to install the manual pages.
+
+ If you get ANY errors or warnings while compiling this code
+ (excepting warnings about the function signal), please send
+ me email with a complete copy of the output of make as well as
+ a copy of the config.h file.
+
+ IMPORTANT NOTE: You do not need to run the fspd process if you only
+ wish to access existing fsp archives. FSPD is only needed if you
+ wish to set up and maintain a new archive for use.
+
+Client utilities:
+ All inter-command states are kept in these three shell environment
+ variables.
+
+ FSP_PORT Port number of the fspd you wish to contact.
+ FSP_HOST Host name or number of the fspd.
+ FSP_DIR Your current working directory in the archive.
+
+ When multiple client utilities are run at the same time on the
+ same client machine, packet multiplexing mechanisms can be used
+ to enable concurrent access to the same fsp database. If none
+ of the mechanisms are selected at compile time, FSP_LOCALPORT
+ can be used to ensure that only once client utility can run at
+ any time. In this case, FSP_LOCALPORT can be set to any port
+ number not current used on the client machine.
+
+ FSP_TRACE can be set if you want status reports be printed while
+ files are being transferred.
+
+ FSP_DELAY variable can be used to set the retransmit interval for
+ client utilities (in thousandth of a second). The retransmit rate
+ is adjusted in an exponential manner, until the retry rate reaches
+ 5 minutes per retry. This delay cannot be set below 250 usecs.
+
+ FSP_BUF_SIZE can be set to a positive number less than or equal
+ to 1024. When set, it determines the size of data to be send for
+ each request during file and directory information transfer. The
+ default is 1024. Some sites are connected via links that cannot
+ transmit buffers containing 1024 bytes of data in addition to the
+ header information. Setting FSP_BUF_SIZE to a lower value will
+ allow these sites to access fsp archives.
+
+ FSP_LOCAL_DIR can be set to a local working directory from/to which
+ all data will be transferred.
+
+Server Administration:
+ The only things you need for setting up a FSP server is a work
+ directory for the service the FSP server itself (fspd) and
+ an fspd.conf file in the place you specified in include/server_conf.h.
+
+ To create an fspd.conf file, copy the example.conf file
+ provided to the correct place and edit to suit your tastes.
+
+ fspd can run independently or it can be run under inetd. When
+ running independently, fspd waits for messages through a UDP
+ socket whoes port number is defined in the fspd.conf file.
+ When runing under inetd, fspd is invoked as in.fspd. Inetd will
+ spawn fspd when a message arrives for the FSP socket. The fspd
+ process will take over and stick around to wait on additional
+ messages. After 2 minutes pass with no messages, fspd will exit
+ and return control to inted.
+
+ Sample setup for inetd operation:
+
+ In /etc/services file:
+
+ fsp 21/udp fspd
+
+ In /etc/inetd.conf file:
+
+ fsp dgram udp wait ftp /usr/etc/fspd in.fspd
+
+ In this sample, the same port number for ftp is used for the
+ fsp socket. There will not be a conflict because ftp uses
+ stream protocol, and fsp uses UDP protocol. The fspd program
+ in this example is ran under user 'ftp'.
+
+ Many other options controlling the behavior of fspd can be set in
+ the fspd.conf file. Please read the comments in the fspd.conf
+ file for details.
+
+ FSPD provides directory security through a series of . files created
+ in the directories serviced by fspd. These files are invisible to
+ the clients, and can (mostly) be changed via the fprocmd client
+ utility (or by the server administrator manually). The only file
+ that can not be changed in this manner is the ownership of a
+ directory. The files and their meanings are:
+
+ .OWN.XXXXXXXX specifies that the machine whose IP number is
+ encoded as XXXXXXXX owns the directory. The owner
+ of a directory automatically has all other rights to
+ a directory and is the only one that can change the
+ other protections. It is created when a directory
+ is initially created in the archive via fmkdir.
+
+ .FSP_OK_DEL Grants any client the permission to delete any file
+ from the current directory.
+
+ .FSP_OK_ADD Grants any client the permission to add new files to the current directory.
+
+ .FSP_OK_MKDIR Grants any client the permission to create new sub-
+ directories under the current directory owned by
+ the client creating the directory.
+
+ .FSP_PRIVATE If this file exists, only the owner of the directory
+ is allowed to read the contents of the files in the
+ directory. Subdirectories of this directory will
+ inherit the privacy protection.
+
+ Clients do not get to read the directory information directly.
+ Instead, fspd maintains a directory listing for each directory
+ in a cache file. If the directory is writable by fspd, or if a
+ writable file in it is prepared beforehand, fspd will store the
+ directory information in .FSP_CONTENT file in that directory.
+ Otherwise, it will store the information in a pair of files (with
+ hashed names) in a special directory specified in the fspd.conf
+ file. The latter allows read-only directories to be exported.
+
+ When a client requests information for a directory, the cache
+ file is created if it doesn't exist, and it is rebuilt if it is
+ out of date. The information is accessed by having the client
+ read the directory listing file. Care is taken so that the client
+ will not get corrupted entries when the directory is changed while
+ the listing is being read.
+
+ Files being uploaded are first written to a temporary file in the
+ work directory: .TXXXXXXXXYYYY where XXXXXXXX is the inet number
+ of the client, and YYYY is the port number of the client program.
+ When upload is compelete, the file is moved into the intended
+ location.
+
+ Sending it an 'alarm' signal will cause fspd to dump its current
+ client database into the file .HTAB_DUMP in the work directory.
+ This can be useful for debugging and for catching rogue clients.
diff --git a/MACHINES b/MACHINES
new file mode 100644
index 0000000..81a0a58
--- /dev/null
+++ b/MACHINES
@@ -0,0 +1,12 @@
+This is a list of machines and architectures under which this code has been
+successfully compiled out of the box using configure script. If you get it to
+compile on an architecture/compiler combination other than one listed here,
+PLEASE SEND ME DETAILS of the fsp version, the type of machine, the OS, the
+compiler used and C library used; As well as what changes (if any) were needed
+to for a clean compile. My email address is hsn/at/cybermail.net. Thanks
+for your cooperation.
+
+FSP Version CPU OS Compiler C library
+--------------------------------------------------------------------------
+2.8.1 Beta 5 i386 Linux 2.4 GCC-3.2 GLIBC 2.3.1
+2.8.1 Beta 10 i386 Linux 2.4 GCC-2.95 GLIBC 2.3.1
diff --git a/doc/HISTORY b/doc/HISTORY
new file mode 100644
index 0000000..357824b
--- /dev/null
+++ b/doc/HISTORY
@@ -0,0 +1,606 @@
+------------------------------------------------------------------------------
+A.J.Doherty
+
+Version 2.8.1b3 -- March 14, 1996
+ 1) Fixed host file configuration problem properly. Problems with
+ regard to differences between big and little endian machines
+ are now sorted out.
+ 2) Fully fixed symbolic link issues with regard to security. FSPD
+ now jumps to directories and verifies that they do lie within
+ the defined FSPD directory tree. Symbolic links to root will
+ end up leading to the base of the directory tree and ../../..
+ type links will be revised to lie within the tree, they might
+ not always be valid however (particularly for sites which
+ are mirroring someone elses filesystem) in which case they fail
+ and the "directory not found" message will be returned.
+ 3) FILES file brought up to date.
+ 4) As suggested by J.H.M.Dassen the default server fspd.conf file
+ will now be looked for under /etc/fspd.conf when running on
+ Linux systems. Also on Linux systems the user configuration file
+ will now be searched for under /usr/etc/fsp_prof this should
+ conform with the "approved" Linux Filesystem Structure.
+ 5) Added a TODO file so people have some idea of what is forthcoming.
+
+Version 2.8.1b2 -- March 4, 1996
+ 1) Amendments to the manuals to make them more accurate and/or
+ clearer.
+ 2) Amendments to the example.conf example FSPD configuration file.
+ This ought to make it clearer what the options are and what they
+ do (thanks to Darren VanWageningen for pointing out this need).
+ 3) Use of the ./configure --prefix=/dir/name feature is now possible.
+ FSP will be installed into /usr/local by default or into the prefix
+ directory if one is specified.
+ 4) FSPD should now trap symbolic links that go outside of the root
+ of the FSP directory tree. Symbolic links that point to / are
+ redirected to the FSP root directory, all others are flagged and
+ ignored.
+
+Version 2.8.1b1 -- January 17, 1996
+ 1) Fixed problem with fspd exiting if it has execute permission
+ to a directory but no read permission and client asks for dir
+ listing. It now returns "No such file..." (server/file.c)
+ (thanks to Dimitri Ars for pointing this out)
+ 2) Fixed configure.in script problem for Dynix Systems (thanks to
+ Laurent Montaron for pointing this out).
+ 3) Fixed configure.in to check for limits.h, so that distribution
+ builds cleanly on IRIX based machines.
+ 4) Idle delay maximum size reduced from 5 minutes to 3 minutes
+ 5) Idle delay increased more gently increases by 50% each time
+ rather than doubling each increment
+ 6) Server will flag unsupported commands (> 0x7f) and send back
+ a message saying it only supports protocol revisions 2.8.1
+ and below. This prevents it from silently ignoring ver 2.9.0
+ and above clients.
+ 7) Amendment in clients/fver.c to get around problem which was
+ cropping up on big endian (Sun/Solaris) machines.
+ 8) Fixed some more typos and spelling errors in the documentation.
+
+Version 2.8.0b2 -- October 31, 1995
+ 1) Fixed reversed IPs (for restricted hosts) in server/host.c
+ Thanks to Tanel Pronto Raja for pointing out I'd missed it.
+
+Version 2.8.0b1 -- June 22, 1995
+ 1) Changed default optimization to -O
+ 2) Changes to allow compilation on Linux
+ changed d_reclen to d_rcdlen in include/util.h
+ changed d_reclen to d_rcdlen in client/util.c
+ 3) Heavy revision of the configure.in template and regeneration
+ of the configure shell script using GNU Autoconf v.2.4
+ 4) Modification of the INFO file
+ 5) Changed client/lock.c:210 "proj" field now fits into a byte
+ 6) Modified adaptive timeout client/lib.c
+ 7) Added "/n" to server/host.c:210 (thanks to Jason Duerstock)
+ 8) Fixed Typo in include/tweak.h.in:31 (thanks to Chad Larson)
+ 9) Changes to allow build on Interactive Unix 4.0 (thanks to Chad
+ Larson)
+ 10) Documentation fixes (thanks to Chad Larson)
+ 11) Removed redundant quotes in setup:16 (thanks to Chad Larson)
+ 12) Fixed malloc fault in clients/fhostcmd.c:70 (thanks to Chad Larson)
+ 13) Changes to allow clean configure and build on Solaris 2.x
+ 14) Tweaked server/file.c to fix README problem. It will now only accept
+ up to 1022 bytes of a directory .README file to prevent packet
+ overflow problems.
+ 15) Reorganised ChangeLog order so you can see the latest differences.
+ 16) Keyed all fopen(s) in server/file.c with "b" (binary mode) to allow
+ easier porting of the server to non-UNIX platforms (thanks to Ray
+ Garcia).
+ 17) Lots and lots of tidying up of the source code - amount of output
+ generated by compiling by -Wall has about halved. Still plenty to
+ go yet though.
+
+Version 2.7.1 -- May 7, 1993
+ 1) Ironed out portability problems.
+ 2) Fixed the pointer to in cast in server/filecache.c (thanks
+ to wen-king)
+ 3) Added WenKing's patches for the Dec Alpha
+ 4) Merged in Sven's patches for fixing 2.7.0 on a VMS system.
+ 5) Added aclocal.m4 with some macros to start cleaning up the
+ configure.in file a bit. Some macros needed changing to
+ get the configure script to configure properly on a linux.
+ 6) Fixed a bug in server_upload where a file could not be
+ uploaded unless the server had a valid cache dir set.
+ Thus, any sites that didn't use cache dirs couldn't have
+ files uploaded.
+
+Version 2.7.0 -- May 3, 1993
+ 1) reorganized source code completely.
+ 2) Installed the source code under Gnu autoconf
+ 3) Added ffind client submitted by Michael Meskes.
+ 4) Rewrote portions of the documentation.
+ 5) Moved all configuration out of the Makefile and
+ into header files and an fspd.conf file
+ 6) Added -r recursive option to fgetcmd and fcatcmd
+ (thanks to Michael Meskes). Read man pages for details.
+
+Version 2.6.6.5 -- Apr 19, 1993
+ 1) Fixed a bug in the .IPHOST code. (Thanks Laurent and Phil)
+ 2) Fixed a few typos and compile problems with the merged
+ client. (Thanks to the numerous people who reported it)
+ 3) Changed the code for fducmd slightly (Thanks Michael Meskes)
+ (NOTE: Michael has also written an ffindcmd that will be in
+ the next release, it's not included here)
+
+Version 2.6.6.4 -- Apr 13, 1993
+ 1) Fixed yet another small bug with readme files that I'd
+ created.
+ 2) Encased all printing of strings recieved from a remote
+ site inside some sanity to prevent them sending a %s or
+ something as part of a string and having it choke.
+ 3) A core dump in the logging code where there was a case
+ under which it did not return after an error is fixed
+
+Version 2.6.6.3 -- Apr 12, 1993
+ 1) Added bitfields containing the version and protection
+ information into the getpro and fver commands. Newer
+ clients should rely on that information and thus be able
+ to present it in any display format desired.
+ 2) Logging code will now stat the logfile and if it's no
+ longer there, it will recreate it after closing the old
+ fd. This saves the system expense of opening and closing
+ a logfile each time we log something, and still allows the
+ deletion of logfiles during a run.
+ 3) Modified clients to present information from the bitfields
+ for ver and pro, and modified the server to give only
+ minimal textual information for ver and pro.
+ 4) Added a sanity check to FSP_DELAY variable to never let
+ it go below some specified minimum value. This minimum
+ value is set in common_def.h and defaults to 500 usec.
+ 500 usec should remove the problem of the infinite resend
+ client.
+ 5) Fixed a small bug in logging where it would add one newline
+ for every 1k uploaded to the logfile.
+
+Version 2.6.6.2 -- Apr 8, 1993
+ 1) Added patches to make the client_timeout value be settable
+ via an environment value. Default timeout value is 4. The
+ change has no effect unless you compile the clients to time
+ out if there is no response. (patches by Michael Meskes)
+ 2) Added fducmd and fsethostcmd written by Michael Meskes.
+ fducmd is a standalone (or merge) version of the du cmd
+ that phil put into his fspclient. Fsethostcmd supports
+ a fairly simple resource file for setting up hosts and
+ local directories and all environment variables based on
+ information in a file.
+ 3) Fixed a bug in fgrab that caused you to not be able to
+ grab a file even though you could get it and then rm it.
+ 4) Fixed the IPHOST code. It was returning automatic vars
+ up the stack, and assuming that assigning a structure
+ to a structure performed copy. This is not always the
+ case, and when compiled under ultrix cc this assumption
+ broke. The fix was to malloc the structures down and
+ pass pointers up the stack initially, and then store
+ those pointers. The code has been tested now as well,
+ and verified to work on at least my system.
+ 5) The server will now log an 'Unknown command.' error
+ if it gets a command request that it doesn't know how
+ to handle, and will return this string to the requesting
+ client. (requested by Robert Martin-Legene)
+ 6) Fixed a bug in build_dir() reported by Phil Richards.
+ A file could get a garbaged 'long_name'.
+ 7) Added better logging code supplied by Phil Richards.
+ 8) Added reverse hostname lookup and read only mods supplied
+ by Phil Richards.
+ 9) Removed a bug that caused logging to be turned on even when
+ the -l option wasn't specified.
+ 10) Changed the name of the fsethostcmd to fhostcmd so that
+ POSIX machine nameing conventions were followed.
+ 11) Renamed the .fsprc file used by fhostcmd to .fsp_prof
+
+Version 2.6.6.1 -- Mar 11, 1993
+ 1) Reduced the client timeout from 5 to 4.
+ 2) Made client timeout code default in the makefile.
+ 3) Made printing of 'E' on retrys conditional on
+ trace being true.
+ 4) Shortened temp file names so that they will always
+ fit under 14 character limit.
+ 5) Yet more small fixes from Sven to make 2.6.6 compile on
+ VMS cleanly. (thanks Sven)
+ 6) .README file support thanks to Pihl
+ (phil.richards@prg.oxford.ac.uk)
+ 7) More advanced Hostname security thanks to Phil as well.
+ (Look in the INFO file for details)
+ 8) Rewrote logging to use varargs based on ideas from Phil.
+ 9) If no password is supplied, and the .OWN.XXXXXXXX file is
+ empty, then you will still be able to read the directory.
+ This reinstitutes backward compatability in the server with
+ older clients that cannot send passwords.
+ 10) Changes to support a local working directory for all remote
+ operations courtesy of Michael Meskes
+ (Last Updated: 25th June 1996)
+File Service Protocol (FSP)
+
+
+
+Frequently Asked Questions
+ +
These are the answers to some of the frequently asked +questions about FSP. Posted twice monthly to alt.comp.fsp, +alt.answers and news.answers.
+ +This information is mostly compiled from the alt.comp.fsp
+newsgroup, although many other people and information sources
+also contribute. It is edited and prepared by Andy Doherty
+(A.J.Doherty@reading.ac.uk)
+- who is also the current maintainer of the FSP software.
This FAQ may be found in the alt.comp.fsp +newsgroup and from the news archives at rtfm.mit.edu . However, +the most recent version will always be found at its WWW home of +http://itu.rdg.ac.uk/misc/fsp/faq/faq.htm
+ ++ +
+ +
+ +
Alt.comp.fsp is a Usenet newsgroup for discussing the FSP file +transmission protocol. It was created on Tuesday 4th May 1993 by +Wen-King Su (wen-king@cs.caltech.edu) after there was no +objection on alt.config. Before the newsgroup, there was a +mailing list (fsp-discussion) for talking about FSP software +internals. This newsgroup is for discussion of both writing and +using the software.
+ +FSP is a protocol, a bit like FTP (but see below), for moving +files around. It's designed for anonymous archives, and has +protection against server and network overloading. It doesn't use +connections, so it can survive things falling over.
+ +Quote: `FSP is what anonymous FTP *should* be'.
+ ++ +
The `official' place for FSP distributions is +ftp.germany.eu.net
+ ++ +
It is available both by FTP and FSP: the FSP server is on port +2001.
+ +The latest release versions for each platform are:
+ ++ +
+
+
+
+
+
+
The Unix version is the `original', and was originally written +by Wen-King Su: Joseph Traub took over for a while, followed by +Phil Richards and Pete Bevin, Andrew Doherty maintains it +currently. The same distribution contains patches by Sven Pechler +to make it run on VMS. Larkin Lowrey wrote the OS/2 version, +Lindsey Smith wrote the MS-DOS version and Garrick Lau wrote the +Windows-95/NT version. Email addresses are in Section +4.
+ ++ +
If you're already familiar with FTP, you might want to use one +of the FTP-like clients instead, or even a graphical interface. +See the answers to questions 2.1 and 2.2 below for details of how to get them.
+ +The following tutorial is adapted from an article in +alt.comp.fsp by David DeSimone (fox@netcom.com).
+ +The original FSP seems to have been designed for use with csh +aliases, so if you use csh, try these aliases in your .cshrc:
+ +# FSP aliases: + alias fcat '(set noglob; exec fcatcmd \!*)' + alias fcd 'setenv FSP_DIR `(set noglob; exec fcdcmd \!*)`' + alias fget '(set noglob; exec fgetcmd \!*)' + alias fgrab '(set noglob; exec fgrabcmd \!*)' + alias fls '(set noglob; exec flscmd -F \!*)' + alias fll '(set noglob; exec flscmd -l \!*)' + alias fpro '(set noglob; exec fprocmd \!*)' + alias fpwd 'echo "$FSP_HOST ($FSP_PORT): $FSP_DIR"' + alias frm '(set noglob; exec frmcmd \!*)' + alias frmdir '(set noglob; exec frmdircmd \!*)' + alias fhost 'set fsp_host=(\!*); source ~/bin/fhost; unset fsp_host' ++ +
The last alias, "fhost", is my own invention, and +the ~/bin/fhost file looks like this:
+ +#!/bin/csh + # + # Since this script sets environment variables, it really needs + # to be source'd rather than executed. Thus the following alias + # should be used: + # + # alias fhost 'set fsp_host=(\!*); source ~/.bin/fhost; unset fsp_host' + # + + if ( $#fsp_host > 0 ) then + + setenv FSP_HOST $fsp_host[1] + + if ( $#fsp_host > 1 ) then + setenv FSP_PORT $fsp_host[2] + else + setenv FSP_PORT 21 + endif + + if ( $#fsp_host > 2 ) then + setenv FSP_DIR $fsp_host[3] + else + setenv FSP_DIR / + endif + + endif + + if ( $?FSP_HOST ) then + echo "$FSP_HOST ($FSP_PORT): $FSP_DIR" + endif ++ +
This alias lets you "connect" to a host quickly and +easily. For instance, to start out I give the following command:
+ +% fhost wuarchive.wustl.edu + wuarchive.wustl.edu (21): ++ +
The "fhost" command tells me where I'm connected, on +what port, and in what directory.
+ +Since all "fhost" does is set up some environment +variables, we aren't REALLY connected. To find out if the site is +responding, just do a quick "fls":
+ +% fls + README etc/ mirrors2/ pub/ + README.NFS graphics/ mirrors3/ systems/ + edu/ mirrors/ private/ ++ +
Looks like we're up and running! Navigating with FSP is now +just like using the local filesystem, except the commands have +"f" in front of them. For instance:
+ +% fcd /systems/amiga/incoming + directory mode: (owner: some other machine)(delete: NO)(create: NO) + % fls + AT3D-Demo.bad devel/ utils/ + AT3D-Demo.readme fish/ wb30/ + comm/ programming/ demos/ + text/ ++ +
Other nice commands like "fcat filename" let me see +what's out there, or for larger files, "fcat filename | +less" is very effective.
+ +Once I see a nice file that I want copied to my local system, +I just give the "fget filename" command and away it +goes. Usually I type "fget filename &" which throws +the transfer request into the background. Then I can immediately +go off and "fcd" to some other directory and look for +more files to grab, "fcat"-ing the README files and +such.
+ ++ +
+ +
When FSP doesn't get any response from the server, it keeps on +sending requests. The first time it retries, it prints an +"R", (meaning "Retry"), and the second, +third, and subsequent times, it prints an "I". You +might also see an "E", which means "error": +FSP got a packet, but it was corrupted for some reason.
+ +Fspclient does it slightly differently: it starts by printing +"r" and "R" characters, and then uses +"-\|/" characters to draw a spinning bar. As Phil +Richards (the author) says, `I quite often see spinning bars, but +usually only after the fifth pint'.
+ ++ +
+ +
Because it's one more way people can access your site, and it +won't cost you much extra load on the machine. The FSP daemon +never forks, so it won't increase your load average by more than +one. FSP doesn't add much to the network load either, and you can +limit the amount of data the daemon will send out per second.
+ +FSP allows comprehensive logging, running off inetd, README +files per directory, banning on per-host or per-network basis, +reverse naming and read-only sites. The only thing anonymous FTP +gives that FSP doesn't is having the user type in an email +address, and of course, this can easily be faked. FSP logs give +the user's hostname, which is harder to fake.
+ ++ +
+ +
When unable to get a response to it's last request an FSP +client use a non-linear algorithm to increase the delay until +they re-try. Effectively this means that during a transfer a +client may appear to be sitting their doing nothing for periods +of time, as the timeout in use increases to high values, to +paraphrase Wen-King Su - "the algorithm is brain +damaged". This problem has been addressed in the next +release of FSP (in beta testing).
+ ++ +
+ +
Phil Richards' (pgr@sst.icl.co.uk) fspclient. The latest +version (still pre-alpha, but more reliable than your average +beta release) is fspclient.0.0-h. You can get it by FTP from
+ ++ +
Another interface to use is Nicolai Langfeldt's 'fspcli'. It +has a ftp like interface and more. It has been posted on +alt.sources. Another nice thing about it is that it's a +small(ish) perl script rather than a large compiled executable, +and it's not alpha OR beta. Presently the latest version is 1.2.1 +and is available at
+ ++ +
Ove Ruben R Olsen (Ruben@uib.no) has written a client quite +similar to Nicolai's, but even smaller. It is available at
+ ++ +
Note that if you want to use either of the last two clients, +you'll have to have the Perl language installed. You can get the +latest version by FTP from prep.ai.mit.edu in /pub/gnu/perl*, or +from most sites which mirror GNU, such as ftp.germany.eu.net .
+ ++ +
+ +
The interface I use is FSPtool (not suprising really + :-) ) by myself [Andy Doherty + (A.J.Doherty@reading.ac.uk)]. It is an XView based client + for the X Window System. Available from:
++
Like fspcli and fspshell, it acts as an interface to + the standard FSP shell commands, rather than rewriting + them itself.
+Note that to use this package, you will need the XView + libraries, if you're using a Sun workstation, or the + standard MIT X11R5/R6 distribution you should be you're + OK: otherwise, you might have to get and compile them + yourself.
++
winfsp12.zip by Ian Heath (ih@ecs.soton.ac.uk) is a + MSW client using WINSOCK.DLL . It's available from
++
fsp4win.zip by Ben Youngdahl (youngdah@cs.umn.edu) is + another MSW client using WINSOCK.DLL . Still in Beta + release it's available from
++ +
+
If you're an OS/2 user, you can use the OS/2 client by + Albert Crosby (acrosby@uafhp.uark.edu). It wraps around + the OS/2 FSP software (see 1.2), + and also requires RexxMenu and RxU. It can read a list of + files in the standard FSP host listing format, and uses + RexxMenu's point-and-click interface.
+Alternatively Larkin Lowrey (llowrey@ucsd.edu) has an + OS/2 FSP client (version 1.0). This can be found at + ftp.cdrom.com as + ftp://ftp.cdrom.com/pub/os2/network/tcpip/fsp2_10a.zip +
+This version includes clients for IBM's TCP/IP 1.2.1 + and TCP/IP 2.0. Both are 32-bit and fully handle + longfilenames.
++
Jim Browne (jbrowne@jbrowne.com) is working on a + version for the Macintosh. If you're interested you can + ask to be put on a mailing list by mailing him at + jbrowne@jbrowne.com. The latest version is available at + http://www.jbrowne.com/Projects/MacFSP.html. Older + versions are available from the following places:
++
Alternatively another beta client - Modris Berzonis' + (imara@mii.lu.lv), "FSP Client for Macintosh + 2.7.1b9" - is available from:
++ +
Last but not least is Tim Endres' (time@ice.com) + "FSPMac 1.1" available from:
++ +
All email enquires about FSPMac should be sent to + (macfsp@ice.com).
++
+ +
Dan Charrois's provides both a "finger" based +read-only service and a WWW based service.
+ ++ +
Interruptions have been experienced with the +"finger" service at Dan's site, in case of difficulty +use the WWW service instead.
+ +He is also happy to accept new site information and updates +via direct email (charro@ee.ualberta.ca), this information would +then be available via the finger and WWW services.
+ +A second WWW based FSP list service can also be found at:
+ +This site is based upon the server originally maintained by +Roy Svendsen and now re-hosted to these locations. It allows list +additions to be made direct from forms supporting browsers.
+ +A small list of sites can be found in Section +5.
+ +You are encouraged to make use of these site information +services or to post site information to alt.comp.fsp . If you +post in the format below, most people will be able to slurp your +list straight into their front-end programs.
+ +The standard for the format is:
+ +hostname port alias root-directory # comment ++ +
for example:
+ +ftp.germany.eu.net 2001 germany / # big German archive (FSP) ++ +
Hostnames should be actual names rather than IP addresses +wherever possible.
+ ++ +
+ +
Seriously, FSP has a reputation of being for "crooks and +perverts". If you know any sites carrying illegal material, +then do them a favour and keep them to yourself. Posting them +won't make you any friends.
+ +If someone posts a list of sites, and you didn't want them to, +please don't publicly flame them. It doesn't endear you to +anyone. If you must put them right, send email. Thank you.
+ +PS: Don't ask me either.
+ ++ +
+ +
The revision of the FSP protocol to version 3.0 is currently +on going. Forums for discussion are the alt.comp.fsp newsgroup +and the fsp-discussion@germany.eu.net mailing list.
+ +Current work in progress includes an FSP RFC (Request For +Comments) - basically an internet specification of the protocol; +alterations to improve security facilities; a programmers API and +miscellanous extra features & facilities.
+ +In the meantime a new release (v.2.8.1 Beta 1) was released to +Beta testing in January 1996, superseding the previous 2.8.0 Beta +series. It fixes a number of portability issues, known bugs and +documentation errors. It also provides scope for backwards +compatibility with revisions to the FSP protocol which are +scheduled for FSP 2.9.0 and beyond.
+ +The next scheduled release is v.2.9.0. This is intended to act +as a migratory step to 3.0. Some alternations will be made to the +client and server functionality in 2.9.0, but this release is +mainly intended to greatly simplify and tidy the code base, +bringing it up to date with ANSI C/C++ and the POSIX standards. +This release is also intended to provide a foundation for much +easier porting of the software between platforms, including +Win32/Winsock 2.0 support scheduled for inclusion in 3.0.
+ ++ +
+ +
From the user's point of view, the differences are not that +great, except that some of the more annoying features of FTP are +gone. Here are the main differences.
+ ++ +
+
+
+
+
From the programmer's point of view, fsp is a complete +rewrite.
+ ++
++
+ +
+ +
By default, the FSP daemon keeps logs of transactions, along +with their site names. An FSP administrator could use this to +find out who you are, with a reasonable degree of certainty.
+ +In short, FSP gives you no more privacy than anonymous FTP. +Anyone who tells you different has a less devious mind than most +FSP admins I know.
+ +Why not make FSP more anonymous? Well, it's impossible to make +a protocol with complete anonymity, since at some point, the +remote site will have to send a file back to you, and it needs at +least an address to send it to.
+ +If you really need privacy, you can encrypt any files you make +available, and only give out the decryption password to a select +few. But of course, you have to trust them to keep the password +safe.
+ ++ +
+ +
Thanks to Joseph Traub for the material for this section) +
+ ++ +
+
+
+
+ +
+ +
As of 12th August 1993, FSP stands for `File Service +Protocol'. Thanks to Michael Grubb (mg@ac.duke.edu) for the +words, and Wen-King for the initials.
+ +Other suggestions were:
+ ++ +
+ +
+ +
The previous maintainers were + Phil Richards (pgr@sst.icl.co.uk) and Pete Bevin + (pete@bestiary.demon.co.uk) from July 1993 to March 1994. + Phil is also the maintainer of fspclient, an FTP-like + interface for FSP.
+Joseph Traub (jtraub@dragoncat.net) was maintainer + from Dec 1992 to July 1993 (versions 2.6.5 to 2.7.1).
+Wen-King Su (wen-king@cs.caltech.edu) wrote the + original Unix version (versions 1.0 to 2.6.4).
++
+
+
+
+
+ +
Jim Browne (jbrowne@jbrowne.com) and Modris Berzonis +(imara@mii.lu.lv) are both writing (soon to be released?) +Macintosh clients. See Section 2.2.3. +
+ +Andy Doherty (A.J.Doherty@rdg.ac.uk) wrote and maintains 'FSPtool' an X-Windows based Unix +client. Also the FSP and alt.comp.fsp FAQ maintainer.
+ +Ian Heath (ih@ecs.soton.ac.uk) wrote 'winfsp' +an MS-Windows based client.
+ +Nicolai Langfeldt's (janl@ifi.uio.no) wrote and maintains 'fspcli' a Perl based client.
+ +Ove Ruben R Olsen (Ruben@uib.no) wrote and maintains 'fspsh', another Perl based client.
+ +Phil Richards' (pgr@sst.icl.co.uk) wrote and maintains 'fspclient'.
+ ++ +
+ +
The following people have contributed to the FAQ. Thanks very +much to all of them.
+ ++ +
+ +
The following is a small list of the some sites which are +available through the FSP protocol. This list should be +reasonably up to date but comes with no warranty. It is in the +unofficial "taxus" format. ftp.germany.eu.net is the +official home for FSP, the FSP software distributions and other +related packages can be found there.
+ ++ genie.lut.ac.uk 21 genie / # small UK site + ftp.germany.eu.net 2001 germany / # big German archive (FSP) + fsp.luth.se 6969 luth / # Top of Europe + src.doc.ic.ac.uk 21 src / # SUNsite Northern Europe + terra.stack.urc.tue.nl 21 terra / # big Netherlands site + ftp.wustl.edu 21 wu / # lots of mirrors ... ++ +
For more site information sources see Q.2.3 +
+ +At least one non-english language translation of the FAQ is +now available, so this section details it, and any others that +may come along over time.
+ +Bear in mind that changes to the main FAQ may take a while to +filter down through translations. Keep an eye on the date at the +top of this copy and see if it matches up to the FAQ source at http://itu.rdg.ac.uk/misc/fsp/faq/faq.htm. +
+ +Nello Castiglione (anicas@cybernet.it) has translated the FAQ +into Italian, many thanks to him for the time and effort spent. +This translation is available from:
+ + + +Comments
and suggestions should be sent to A.J.Doherty@rdg.ac.uk. +The information in this FAQ is in no way associated with the University of Reading or its Information Technology Unit. +This FAQ represents the efforts of many people to help +consolidate information about FSP. There is no guarantee that the +information in this FAQ is correct, nor can anyone contributing +to this FAQ be held responsible for the information they provide. + + +Addresses in () after the answer are the email addresses of +people who have contributed. Please let me know if you don't wish +to be identified when you contribute.
+ +