Using MacFuse on OS X: Part 1
A file system is a method for storing and organizing computer files to facilitate finding and accessing them. Many popular file systems provide a method of access by maintaining the physical location of the files. This includes HFS+ (Hierarchical File System), the preferred file system of Mac OS X, in addition to NTFS (NT File System) and FAT32 (File Allocation Table). File systems may also simply act as clients for a network protocol, allowing access to files on a server (e.g. NFS). Finally, there are “virtual” file systems which provide an access method for data. For example, the procfs under UNIX provides information about processes in a directory-like structure.
MacFuse makes it possible to implement a fully functional file system in a “user-space” program on Mac OS X. This means that the implemented file system code can be created and run by non-privileged users without the need to write kernel code. The FUSE (File System in Userspace) module provides a bridge to the actual kernel. It attempts to be compliant with the original FUSE mechanism originated on Linux. This allows users to compile and use many popular FUSE file systems that have been developed on other platforms in addition to new ones built specifically for Mac OS X. This allows developers to build file system definitions that will work on any platform as long as they meet the FUSE specifications.
MacFUSE was developed by Amit Singh, Manager of Macintosh Engineering at Google, and is available on the MacFUSE website hosted by Google Code. Incidentally, Amit Singh is also the author of one of the most comprehensive books on OS X internals ever written. MacFUSE requires Mac OS 10.4 Tiger or higher. To install it, download and open the MacFUSE Core package available on the web site. Once the installation is complete, your computer should be ready for some of the available FUSE file systems. To install some of them, however, you may require the open source packages pkg-config, gettext, and especially glib. These packages can be installed using Fink, MacPorts, or the instructions provided in the HOWTO on the MacFUSE web site.
FTPFS and SSHFS are FUSE file systems that allow you to mount remote systems accessible using FTP (File Transfer Protocol) or SSH (Secure Shell) on your system. These will seamlessly appear as mounted drives that you can easily drag and drop files from. FTP is a fairly common network protocol used to transfer files. SSH allows for encrypted communication with remote machines. SSHFS will allow you to securely mount a remote file system, such as your home computer, to transfer or access files using the SSH protocol. SSHFS is available on the MacFUSE web site and is easy to use with a fairly basic graphical user interface. To enable SSH or FTP on your Mac, you must enable “Remote Login” under Sharing in the System Preferences. Make sure you have a robust password and firewall before you enable either of these.
The easiest way to use SSHFS is to use the GUI provided. Download sshfs-1.0.0.dmg from the MacFuse web site and install it. Launch the sshfs.app application and it will prompt you for the server address (e.g. 192.168.1.1 or xyz.com), your user name and password. Once you enter these correctly, the home directory (or any other directory you specify) will be mounted on your computer under /Volumes and will be available for click, drag and drop usage in Finder.
Normally, under Mac OS X, you can only read from drives formatted with NTFS. NTFS is the favored format for modern Windows systems (and Boot Camp) and may be one that you come across quite often. The ntfs-3g FUSE file system allows you to read from and write to an NTFS drive. Here are some instructions for getting it to work under MacFuse on OS X.
In the next part of this article, I will introduce GMailFS, which will allow you to use your GMail storage from Finder and other command line applications to store files. I will also introduce SpotlightFS and WikipediaFS in future parts, each of which will change the way you use those services (Spotlight & Wikipedia) dramatically.
Comments
This meant that the implemented file system code could be run by non-privileged users, and for all intents and purposes the file system was nothing more than a simple program. -Tire Works
MacFuse makes it possible to implement a fully functional file system in a “user-space” program on Mac OS X.i miss you quotes