LinuxCommandLibrary

fusermount

Unmount FUSE filesystems

TLDR

Unmount a FUSE filesystem

$ fusermount -u [path/to/mount_point]
copy

Unmount a FUSE filesystem as soon as it becomes unused
$ fusermount -z [path/to/mount_point]
copy

Display version
$ fusermount --version
copy

SYNOPSIS

fusermount [-o options] mountpoint
fusermount -u mountpoint
fusermount -q mountpoint
fusermount -z mountpoint

PARAMETERS

-o options
    Mount options, comma separated. These options are passed to the FUSE kernel module. Common options include 'ro' (read-only), 'allow_other' (allow other users to access the filesystem), 'allow_root' (allow root to access the filesystem), and 'default_permissions' (enable permission checking by the kernel).

-u
    Unmount the specified mountpoint.

-q
    Quiet mode. Suppress error messages.

-z
    Lazy unmount. Only unmount if the filesystem is not busy. In case of errors, don't return.

mountpoint
    The directory where the filesystem will be mounted (or unmounted).

DESCRIPTION

fusermount allows non-root users to mount and unmount FUSE (Filesystem in Userspace) filesystems. It acts as a helper program for FUSE daemons, abstracting away the complexities of interacting directly with the kernel's FUSE module.

Traditionally, mounting filesystems requires root privileges. FUSE bypasses this requirement by allowing userspace programs to implement the filesystem logic. fusermount provides the necessary bridge between the userspace filesystem and the kernel, handling mount point setup and cleanup.

For mounting a filesystem, the FUSE daemon typically calls fusermount with the mount point directory and a few options. Fusermount then performs the required system calls to create the mount point and inform the kernel. For unmounting, the daemon calls fusermount with the '-u' option. The correct user to run the fuse daemon can be setup as well.

Essentially, it allows you to `mount` a filesystem as a regular user.

CAVEATS

fusermount requires the setuid bit to be set on the executable. This is a potential security risk if not configured carefully. The filesystem daemon needs to be running and properly configured to respond to FUSE requests. The user invoking fusermount needs to have write permission to the mountpoint directory.

SECURITY CONSIDERATIONS

Since fusermount requires elevated privileges (setuid), it's crucial to keep it updated to mitigate potential security vulnerabilities. Always verify the integrity of the FUSE daemon and the filesystem implementation being used.

TROUBLESHOOTING

If you encounter problems mounting or unmounting filesystems with fusermount, check the system logs for error messages from the FUSE daemon or the kernel. Verify that the mountpoint directory exists and has the correct permissions. Also, ensure that the FUSE kernel module is loaded correctly.

HISTORY

fusermount was developed as part of the FUSE project to enable non-root users to mount filesystems. It greatly simplified the process of integrating userspace filesystems into the Linux system. Over time, it has become a standard utility for FUSE-based filesystems, providing a consistent interface for mounting and unmounting filesystems from user space. The command saw significant adoption with the rise of cloud storage solutions and tools that relied on user-space file systems.

SEE ALSO

mount(8), umount(8), fuse(4)

Copied to clipboard