FUSE

Also known as: Filesystem in Userspace

On this page 7

FUSE, short for Filesystem in Userspace, is a Linux kernel interface that lets an ordinary user-space program implement a complete file system, which the kernel then exposes through the normal virtual file system layer. Applications read, write and list files on a FUSE mount with standard system calls and never know that a separate process is answering them.

In the Linux filesystem landscape, FUSE trades some performance for safety, flexibility and rapid development. It powers remote mounts such as sshfs, cloud bucket mounts, encrypted overlays and archive browsers, all without loading custom kernel modules.

How FUSE routes file operations

FUSE works by forwarding virtual file system requests from the kernel to a user-space daemon through a special character device, /dev/fuse. The kernel module registers a file system type, and every operation on the mount becomes a message that the daemon reads, processes and answers.

A typical read call follows a fixed path. The application calls read(), the VFS layer dispatches it to the FUSE kernel module, the module queues a request on /dev/fuse, the daemon returns the data, and the kernel copies it back to the application. Each round trip involves at least two context switches, which is the main source of FUSE overhead.

The components involved in this exchange are summarized below.

ComponentLocationRole
FUSE kernel moduleKernel spaceTranslates VFS calls into FUSE protocol messages
/dev/fuse deviceKernel interfaceChannel for requests and replies
libfuse libraryUser spaceParses messages and calls handler functions
File system daemonUser spaceImplements open, read, write, readdir and others
fusermount3 helperUser space, setuidLets unprivileged users mount and unmount
Main components of a FUSE file system

Developers usually program against libfuse, which offers a high-level path-based API and a low-level inode-based API. The low-level interface requires more work but gives finer control over caching, lookups and reference counting.

Key mount options and performance features

FUSE performance depends heavily on caching and request batching options set at mount time. Without them, every metadata lookup crosses the kernel boundary, which makes directory-heavy workloads slow.

OptionWhat it controlsEffect
allow_otherAccess by users other than the mounterRequires user_allow_other in /etc/fuse.conf
default_permissionsKernel-side permission checksKernel enforces mode bits instead of the daemon
attr_timeout and entry_timeoutMetadata cache lifetimeLonger values cut lookups but risk stale data
writeback_cacheKernel write bufferingMerges small writes into larger requests
max_read and max_writeRequest size limitsLarger requests improve sequential throughput
direct_ioPage cache bypassUseful for streaming or rapidly changing data
Common FUSE options and their effect

Newer kernels add features that narrow the gap with native file systems. Splice support reduces data copies, passthrough mode lets the kernel serve reads directly from a backing file, and the FUSE over io_uring work aims to cut the cost of the request channel. Throughput for large sequential reads can approach native speed, while small-file metadata workloads typically remain several times slower.

FUSE compared with kernel file systems

FUSE differs from kernel file systems such as ext4, XFS or Btrfs mainly in where the code runs and who can run it. A kernel file system executes in privileged kernel context, whereas a FUSE daemon is an isolated process that can crash without taking down the system.

AspectFUSE file systemKernel file system
Development languageAny language with bindingsC, increasingly Rust
Crash impactMount becomes unavailablePossible kernel panic
Privileges to mountUnprivileged users allowedUsually root only
PerformanceExtra context switches and copiesDirect execution in kernel
DeploymentInstall a user programKernel module or rebuild
Typical useRemote, virtual or experimental storageLocal disks and production volumes
FUSE versus in-kernel file systems

FUSE also differs from OverlayFS and tmpfs, which are in-kernel virtual file systems. Rootless container runtimes historically used fuse-overlayfs because unprivileged users could not mount the kernel OverlayFS, although modern kernels now allow that inside user namespaces.

Practical uses of FUSE

FUSE is the natural choice when storage must be presented as files but lives somewhere unusual: on a remote server, inside an archive, in an object store or behind an encryption layer. The table below lists representative categories.

CategoryExample implementationPurpose
Remote accesssshfsMount a directory over SSH
Object storage mountss3fs, rclone mountExpose buckets as directories
Encryptiongocryptfs, EncFSEncrypt files transparently
Foreign formatsntfs-3g, exFAT toolsRead and write non-native formats
Archives and imagesarchivemount, squashfuseBrowse archives without extraction
Application packagingAppImage runtimeMount a bundled application image
Representative FUSE file system categories

Mounting is straightforward: the daemon is started with a mount point, and fusermount3 -u unmounts it. Persistent mounts can be declared in fstab with the fuse. type prefix, for example fuse.sshfs, together with _netdev for network-dependent sources.

Limitations and common mistakes

The biggest FUSE limitation is that POSIX semantics depend entirely on the daemon. A FUSE mount of an object store, for instance, may not support atomic rename, hard links or random writes efficiently, even though the mount looks like a normal directory.

  • Hung mounts: if the daemon stops responding, processes accessing the mount block in uninterruptible sleep; fusermount3 -uz performs a lazy unmount.
  • Permission surprises: without default_permissions, the daemon alone decides access, and other users, including root, are denied by default.
  • Stale metadata: long attribute timeouts hide changes made on the remote side.
  • Poor fit for databases: workloads with many small synchronous writes suffer from the per-request overhead.
  • Security exposure: a malicious FUSE mount can stall callers, so tools that scan file systems should skip fuse types.

A non-technical view

Normally, the operating system itself knows how to store and find files. FUSE lets a separate, ordinary program take over that job for one folder. When something opens a file in that folder, the system passes the question to the program and relays its answer.

This is like a receptionist forwarding calls to a specialist in another office. It is a little slower, but it means anyone can build a new kind of folder without touching the core of the system, and a mistake affects only that folder.

A concrete example

A research group stores about 12 TB of microscopy images on a remote Linux server. Analysts want to open the images in their usual desktop tools without copying whole data sets to their laptops.

The administrator installs sshfs on each workstation and adds an fstab entry of type fuse.sshfs with _netdev, reconnect and an attr_timeout of 60 seconds. Each analyst now sees the remote archive under a local mount point and opens files directly, while the SSH connection encrypts all traffic.

Because only the requested images are transferred, analysts avoid copying terabytes of data, and when the network drops, only that mount pauses while the rest of each workstation keeps working.