Linux provides a powerful feature to integrate remote filesystems into your local one. And if you are required to provide this privilege to non-admin users the kernel extention FUSE might be the tool you are looking for.
This article introduces FUSE and describes how to use it and what kind of interfaces are available.
Contents
Integrating and decoupling file systems is reserved for administrative users by default and supported file systems have to be integrated in the Linux kernel. With FUSE things did change. FUSE allows non-admin users to mount custom file systems. And the file system driver may run in a userspace program. So any user will be able to map (remote) resources into the local file system.
Traditionally Unix systems are mapping any system component and their features to the file system. This is a very powerful technique since every single program will be able to access and modify system properties (if there are sufficient permissions) by simply accessing files in the local file system!
To get an idea of this concept we will dicuss a simple example. For instance, imagine you have got an alarm system attached to your Linux box with various connectors for input and output signals. If you are able to map each and every connector to one or many files any program within our system should be able to keep track of the state of monitored devices by simply reading contents of files mapping the state of sensors. Furthermore your programs will be able to control actors by writing to files that are mapping the state of actors. And because of the simplicity of this concept you will be able to implement your alarm system with any programming language you can think of. Even the visualization of the state of your alarm system via web interface should be a cakewalk…
FUSE enables every user to map data and states to the file system, that are accessible to them. For example …
But FUSE has its limits. Resources that are not supported by your local system and are not reachable directly or via third parties cannot be interfaced.
The following picture shows the path of a system call. The program ‘ls’ is accessing contents within your filesystem mounted by FUSE. (it has been borrowed from the hompage of the FUSE project)

As you can see the following is happening:
If you are interested in the backgrounds of kernel programming and the difference between kernel space and userspace you should take a look to the article Driver Development for Linux 2.6.
To implement a FUSE device driver you are required to utilize a programming language that is able to interface with the FUSE API. However, in the summer of 2010 there are at least 16 programming languages available supporting the FUSE API. The following list provides an overview:
123456789101112131415161718 |
Supported Language to interface with FUSE: * C * C++ * Java * C# * Haskell * TCL * Python * Perl * Sh * SWIG bindings * OCaml * Pliant * Ruby * Lua * Erlang * PHP |
FUSE is running on various operating systems. You are not limited to Linux when you are planning to implement new drivers for FUSE. This is a list of supported operating systems:
The list of supported filesystems and available FUSE drivers is growing quickly. Beside the list of approx. 40 different filesystems the list of FUSE drivers is devided into the following categories:
For details please refer to the list of file systems available at the home page of the FUSE project.
Related articles:
Related resources: