rstash is a pair of programs for dropbox-oriented network file
The server program
rstash-recv, run via
inetd, provides a set of
dropboxes into which other hosts can place files using the client
rstash-send. My current use case for it is transmitting
backup files from VMs to the host machine without opening up
automated-access shell accounts, NFS, or some other element of
overkill that I then have to lock down.
rstash-recv is intended to be run from
inetd as some low-privilege
user, only having the privileges necessary to write to the file
The source installation contains and installs man pages for rstash and both utilities. For convenience, they are also available in HTML form here:
rstash is currently in alpha status; it seems to work, but it may (probably does) have bugs.
Download and installation
Installation is autotooled, so do the usual configure/make/make
install dance. After installing, set up a configuration file (default
SYSCONFDIR/rstash-recv.conf) and add an entry to your
inetd configuration to activate the server.
The source code is under the MIT license.
If you want to monitor progress on rstash, the development sources are available from my Mercurial repository at [http://bitbucket.org/elehack/rstash/]. It’s a BitBucket repository, so the bug tracker is there too.
rstash should work on any Unix-like system. It has been tested on GNU/Linux (Debian Lenny and Ubuntu 8.04) and FreeBSD 6.4 (client only).
The only dependency for rstash outside of a functioning build system and Unix-like operating system is mhash.
rstash is not the only solution to file transfer problems. There are, of course, ftp, ssh, nfs, and other heavyweight systems. As discussed above, rstash was designed for situations where these are undesirable overkill and unnecessarily difficult to secure.
Comparison with sendfile
Since writing rstash, I have been advised to the existence of sendfile, a system for asynchronously transferring large files between users on different hosts. It looks like sendfile can solve some of the same problems rstash was intended to, although sendfile is oriented towards user-to-user transfers and rstash towards host-to-host transfers (system administrators running backups, etc.). rstash has the following benefits over sendfile:
- Authentication for incoming file connections – only clients with the authentication key can send files.
- Server runs as an unprivileged user.
- No receive program/instance – files show up directly in the drop box’s directory on the host system.
Disclaimer: I have not used sendfile myself, merely downloaded it and perused its documentation to see what I missed in my initial search for existing work. If my assessment here is incorrect, please let me know.