Monday, May 16, 2011

[hqaqxtoh] Sending files between users

On occasion, one needs to send a file from one user to another; the initial use case is they are on the same system.  E-mail with MIME encoding is the obvious solution, but still kind of clunky: develop better command-line tools and libraries.

alice:
cat foo | send --tag=abc bob

bob:
recv --from=alice --tag=abc > myfoo

This could run asynchronously (like email does, now), or synchronously (both alice and bob must be logged in and running the commands simultaneously).  If asynchronously, transparently use public key cryptography (with the private key unlocked on login) to hold the "float" until it is received and deleted (avoid an adversary being able to read the file if the system is seized).  PKI should be simple on a closed system.

The motivation was to get rid of the need for a globally visible /tmp; one of /tmp 's uses was to share files and directories between users.  If it weren't for this, most of the time, what is needed is per-user temporary directories.

If every process runs with a different UID (locked down system), then this could be a method of interprocess communication.

No comments :