Debian – Is it possible to make a USB port provide access to a file system

debianfilesystemsusb

This is a weird one. Allow me to clarify, I have a Debian Linux file server – and I need to access some files from it. Usually, I would just use a network for this (wifi, ethernet, etc) but unfortunately the client computer can only access files over USB (the client is designed so that you can insert a USB flash drive, from which it reads).

Is there a way of making a USB drive pretend that it is a flash drive (or similar)? Perhaps that's phrased badly; to put it another way — how do I make a USB port provide a file system instead of using it to access one?

Update: I forgot to mention that I'm using Debian Linux for the file system.

Best Answer

I'm glad I didn't try this:

http://en.wikipedia.org/wiki/Direct_cable_connection#DCC_with_USB

DCC with USB

Connecting any two computers using USB requires a special proprietary bridge cable solution; the usual USB-to-USB cable does not work as USB does not support such type of communication and attempting to do so may even damage the connecting computers as it can short the two computers' power supplies together, possibly destroying one or both machines or causing a fire hazard. [3] Therefore, Direct Cable Connection over USB is not possible; a USB link cable must be used, as seen in the Microsoft knowledge base article 814982. However, with a USB link cable, a program which supports data transfer using that cable must be used. Typically, such a program is supplied with the USB link cable. The DCC wizard or Windows Explorer cannot be used to transfer files over a USB link cable.

EDIT

If this works, it would be the easiest method; depending on how much you value your time, spending $30-40 bucks on something like this would be the first route I'd take:

http://ca.startech.com/product/PCMACLINK2-USB-to-USB-Data-Transfer-Cable-for-Windows-and-Mac

...and this site references other data transfer USB cables/devices that are (likely) more Linux friendly:

http://www.linux-usb.org/usbnet/

More digging produced this; I've seen this referenced in several other forum threads: http://www.linux-usb.org/gadget/

It's an API that appears to put your host (server) into USB slave mode to emulate a mass storage device. Looks like it's non-trivial to implement (see "how much do you value your time").

After digesting all of this, is there any reason why you can't do the obvious and copy the files you need from the server to a USB pendrive/harddrive?