Networking Notes: Remote File Access in a Virtual Snap
FUSE lets you make filesystems out of all sorts of things, from remote SSH servers to that spare space you have in your gigantic Google Gmail quota.
It's a rare day that I find myself complaining because someone is giving me more of what I paid for than I know what to do with especially when it comes to things like bandwidth and disk space.
My Web hosting provider managed to pull that off that rare feat not too long ago, though, when it began to arbitrarily increase my storage quota by a few gig every so often. What started out as a modest hosting account with a paltry 5GB quota enough to hold a small site plus some e-mail has ballooned into a monstrous 439GB warehouse of mostly unused space.
I can chew about half of it through backing up the hard drives on my laptops and desktop machines. I can waste some more keeping incremental backups. But it's awfully nice to have that kind of space to just run around in or experiment with. Enter Filesystem in Userspace (aka FUSE), a Linux, BSD [define] and Open Solaris project that permits users to make filesystems out of all sorts of things, from remote SSH [define] servers to that spare space you have in your gigantic Google Gmail quota.
What does "make a filesystem" mean? In short, you can create a directory on your local computer then use FUSE to connect your computer to a server and mount that server on the directory you just created. If you're coming to Linux or Unix from a Windows background, think of it as creating a network drive, only you don't have to talk to a Windows server to do it.
The advantage of this approach over just using SSH/SFTP, or FTP, or sending your files as big attachments to Gmail, is transparency. Once you've remotely mounted a FUSE filesystem, it behaves like any local directory. You don't need to run an FTP client that might or might not be much like the GUI you're used to, you don't need to bother with half-remembered command line incantations to move things around, and you don't have to deal with WebDAV's cantankerous permissions issues. You just treat it like any other directory.
FUSE itself is just a framework. To use it you need to install it first (it's part of Ubuntu, Fedora and Debian, though the Debian package requires some extra work. Once you've got it installed, the fun begins.
Some of the more useful FUSE-based filesystems include the following:
Now I bet you're wondering what to do with it.
In my case, FUSE and all that space my provider gave me provided the perfect opportunity to give myself a permanently accessible file store that's easy to get at locally via my Linux server. My provider used to allow its customers to use SMB/CIFS a.k.a. Windows filesharing to access their Web sites and online files, but problems with security caused them to shut the service down. It was pretty slow, anyhow.
Thanks to FUSE, I've got a lot of that functionality back. I've created FUSE SSHFS mountpoints for a collection of files I'm working on and several of the Web sites I maintain. Inside my LAN, they're all accessible via my Linux machine's Samba server. Outside my LAN, they're easy to get to via a more traditional method. If I'm about to hit the road and need to quickly put some files where I can get at them, they're a simple drag-and-drop away vs. loading up an FTP client and logging on.
With a little creativity you can probably think of plenty of other uses for FUSE. As always, if you have any questions about how to make something you learned in this column work (and FUSE can get complex, depending on your Linux distribution), feel free to write.
From small offices to universities, Michael Hall has been using, maintaining and writing about networks for nearly 15 years. He's the managing editor of Enterprise Networking Planet and co-author of "The Joy of Linux."
Add to del.icio.us | DiggThis
For more help, don't forget to try one of our PracticallyNetworked Forums.