FUSE on the Mac

573

Author: Nathan Willis

Filesystem in Userspace (FUSE) has long been one of my favorite features on Linux systems. Using FUSE modules, you can mount all sorts of innovative resources — Gmail, your Flickr photos, a remote SSH server — directly into your local machine’s filesystem and use their contents exactly as if they were normal files. Now you can do the same thing on Mac OS X, courtesy of MacFUSE.

FUSE has never been limited to Linux, of course — FreeBSD has had it for years. And it is OS X’s BSD compatibility that enabled Google engineer Amit Singh to write the FUSE kernel extension and library he released in January.


At the MacFUSE project home page, you will find installer packages for the core MacFUSE utility and two FUSE filesystem modules: SpotlightFS and sshfs. The newest release of MacFUSE Core is 0.4.0, but for right now, I recommend that you download the previous release. Version 0.4.0 is too new to work with the user-friendly utilities you need to get started — including the SpotlightFS 0.1.0 and sshfs 0.3.0 packages.

You can get to MacFUSE Core 0.3.0 through the Downloads tab at the MacFUSE page. The pull-down menu starts off set to Current Downloads — select either All Downloads or Deprecated Downloads to see the older releases.

To get the most out of MacFUSE, you need to understand the difference between FUSE itself and the various FUSE filesystems. If it is not clear, you can get lost in all the terminology.

In a nutshell, FUSE is an application program interface (API). When you install the MacFUSE Core package, you are installing OS X system hooks to the FUSE API. To add any particular filesystem module (such as sshfs) requires installing its own package. The sshfs and SpotlightFS installers at the MacFUSE project are two such packages; MacFusion provides more of its own.

Filesystems galore!

With MacFUSE Core installed, you can compile most existing FUSE filesystems from source. If you intend to take that route, be sure to scour the HOWTO on the project’s wiki for hints before you start. For everyone else, the project-supplied SpotlightFS and sshfs packages are a simpler alternative.

SpotlightFS exploits features unique to OS X. It allows you to access that operating system’s Spotlight integrated search capabilities as though they were part of the standard Mac filesystem. That means you can navigate to a SpotlightFS/foo folder from within any application and have instant access to all files and directories that turn up in a Spotlight search for foo.

As interesting as that is, I find sshfs considerably more useful on a daily basis. It works exactly like it does under Linux; you can use it to connect to any remote machine over SSH: other Macs, Linux PCs, even Web servers at paid hosting facilities. It is far easier to transfer files back and forth with drag-and-drop than with an FTP client, and far easier to manage and edit configuration files when you don’t have to worry about synchronizing multiple copies.

The MacFusion shortcut


The MacFUSE project’s sshfs installer installs both an sshfs module and a simple GUI front end with which you can mount and unmount remote SSH servers. The downside of this front end is that it isn’t “supported” — meaning in this case that when it doesn’t work, you are out of luck.

A better solution is MacFusion, an open source app designed to work with MacFUSE, but which is maintained by other developers. You can download an installer image from its project page. The latest version is 1.1.

MacFusion runs as a “menu extra” — an icon in the top menu bar. It comes bundled with modules for sshfs and CurlFtpFS (for connecting to FTP servers). To connect, all you do is click on the MacFusion icon, move down to Quick Mount, and select FTP or SSH as appropriate. In the resulting pop-up dialog, you enter the address of the server you are connecting to, the username to connect with, and any optional details (such as starting directory). MacFusion will prompt you for a password, which you can optionally store in Keychain for faster access in the future.

Mounted servers appear in the Finder as network disks. They can be browsed, searched, and used just like any external drive. To disconnect, you just click on the Eject icon in Finder. MacFusion lets you store a list of favorite servers, and can check for updated versions of its software automatically.

Since the development of MacFUSE and MacFusion is not coordinated, you sometimes have to wait for both packages to be updated before reaping the benefits of new features. Such is the case right now, as MacFUSE 0.4.0 added support for custom volume icons (which look really cool), while MacFusion has yet to release an update that takes advantage of them.

Still, all things considered, that is a pretty minor inconvenience. MacFUSE and MacFusion together are simple, fast, and convenient. SSH-encrypted access to remote servers, transparently available to all applications? What more could you ask?

Categories:

  • Networking
  • Desktop Software
  • Apple & Macintosh