MOUNT_FUSEFS(8)
π MOUNT_FUSEFS β mount a Fuse file system daemon
okay bestie so this is MOUNT_FUSEFS(8), from the System Manager's Manual, and it's literally the tool that mounts your Fuse daemon's file system. it's giving "matchmaker between your daemon and your kernel" energy and honestly? iconic. let's go β¨
π SYNOPSIS
mount_fusefs [-A] [-S] [-v] [-D fuse_daemon] [-O daemon_opts]
[-s special] [-m node] [-h] [-V] [-o option ...] special
node [fuse_daemon ...]
π¦ DESCRIPTION
so the basic vibe is: you start a fuse daemon on the given special file. in practice the daemon gets handed a special file automatically, and you can then find out which one it is via fstat(1). then mount_fusefs mounts that special file. easy. π«Ά
but like β spawning a daemon is usually automated, so most of the time mount_fusefs does it for you. if the command that invokes a given fuse_daemon is tacked onto the end of the argument list, mount_fusefs will call the fuse_daemon through that command. that way the fuse_daemon gets told to attach itself to special. from there on out, mounting goes exactly like the simple case. (peep "DAEMON MOUNTS" below π)
the special argument is normally treated as the path of the special file to mount.
but β if auto is passed as special, then mount_fusefs goes looking for a suitable free fuse device all by itself. main character energy, honestly.
and finally, if special is an integer, it gets interpreted as the number of the file descriptor of an already-open fuse device (that's what happens when the Fuse library invokes mount_fusefs. see "DAEMON MOUNTS").
the options are as follows, bestie:
β¨ OPTIONS β¨
-A,--reject-allow_otherβ prohibits theallow_othermount flag. it's intended for use in scripts and thesudoers(5)(ports/security/sudo) file. no sneaky allow_other business π-S,--safeβ runs in safe mode, meaning it rejects invoking a filesystem daemon. safe queen behavior π-vβ be verbose. spill the tea about what's happening.-D,--daemon daemonβ calls the specified daemon.-O,--daemon_opts optsβ adds opts to the daemon's command line.-s,--special specialβ uses special as special.-m,--mountpath nodeβ mounts on node.-h,--helpβ shows help.-V,--versionβ shows version info.-oβ mount options go through-o. here's what's available (and also their negated versions, which you get by slapping anoprefix on them, iykyk):allow_otherβ do not apply the "STRICT ACCESS POLICY". only root can use this one, no cap.asyncβ I/O to the file system may be done asynchronously. writes may be delayed and/or reordered. chaotic but valid β¨default_permissionsβ enables traditional (file mode based) permission checking in the kernel.intrβ allows signals to interrupt operations that are blocked waiting for a reply from the server. when this option is in use, system calls may fail withEINTRwhenever a signal is received.max_read=nβ limits the size of read requests to n.neglect_sharesβ don't refuse unmounting if there are secondary mounts.privateβ refuses shared mounting of the daemon. this is the default behaviour; to allow sharing, you explicitly use-o noprivate.push_symlinks_inβ prefixes absolute symlinks with the mountpoint.subtype=fsnameβ suffixes fsname to the file system name as reported bystatfs(2). this option can be used to identify the file system implemented by fuse_daemon. super handy π
besides all the above mount options, there's a whole set of pseudo-mount options that the Fuse library supports. you can list them by passing -h to a Fuse daemon. most of these options only affect the daemon's behavior (i.e. their scope is limited to userspace). however, some of them do require in-kernel support. currently the options supported by the kernel are:
direct_ioβ bypasses the buffer cache system. direct. no middleman. πkernel_cacheβ by default, cached buffers of a given file are flushed at eachopen(2). this option disables that behaviour.
πΈ DAEMON MOUNTS
usually you don't need to use mount_fusefs directly, because the Fuse library lets Fuse daemons invoke mount_fusefs themselves. so like, this:
fuse_daemon device mountpoint
has the same effect as this:
mount_fusefs auto mountpoint fuse_daemon
and that^ is the recommended usage when you want the basic setup (eg, run the daemon at a low privilege level but mount it as root). chef's kiss π§βπ³π
π STRICT ACCESS POLICY
the strict access policy for Fuse filesystems means you can only use the filesystem if the filesystem daemon has the same credentials (uid, real uid, gid, real gid) as the user. matching outfits only, bestie. π―
this is applied to Fuse mounts by default, and only root can mount without the strict access policy (i.e. the allow_other mount option).
the whole point is to shield users from a daemon "spying" on their I/O activities. π no surveillance vibes allowed.
users might opt to willingly relax the strict access policy (as far as they're concerned) by doing their own secondary mount β see "SHARED MOUNTS" below.
π¦ SHARED MOUNTS
a Fuse daemon can be shared, meaning mounted multiple times. when you do the first (primary) mount, the spawner and the mounter of the daemon must have the same uid, or the mounter should be the superuser.
once the primary mount is in place, secondary mounts can be done by anyone, unless this feature is disabled by private. the behaviour of a secondary mount is analogous to symbolic links: they redirect all filesystem operations to the primary mount.
doing a secondary mount is basically signing an agreement: by doing it, the mounter agrees that the Fuse daemon can trace her I/O activities. from then on she's not banned from using the filesystem (either via her own mount or via the primary mount), regardless of whether allow_other is used or not.
the device name of a secondary mount is the device name of the corresponding primary mount, followed by a # character and the index of the secondary mount; e.g., /dev/fuse0#3. cute little naming convention fr fr.
π₯ SECURITY
system administrators might want to use a custom mount policy (i.e. one that goes beyond the vfs.usermount sysctl). the primary tool for that is sudo(8) (ports/security/sudo). however, given that mount_fusefs is capable of invoking an arbitrary program, you gotta be careful when doing this. mount_fusefs is designed in a way that makes that easy, though β for this purpose there are options that disable certain risky features (-S and -A), and command line parsing is done in a flexible way: mixing options and non-options is allowed, but processing them stops at the third non-option argument (after the first two have been utilized as device and mountpoint). the rest of the command line specifies the daemon and its arguments. (alternatively, the daemon, the special and the mount path can be specified using the respective options.) note that mount_fusefs ignores the environment variable POSIXLY_CORRECT and always behaves as described. it said what it said. π
in general, to be as scripting / sudoers(5) (ports/security/sudo) friendly as possible, no piece of information has a fixed position in the command line, but once a given piece of information is provided, subsequent arguments/options cannot override it (with the exception of some non-critical ones).
π ENVIRONMENT
MOUNT_FUSEFS_SAFEβ this has the same effect as the-Soption.MOUNT_FUSEFS_VERBOSEβ this has the same effect as the-voption.MOUNT_FUSEFS_IGNORE_UNKNOWNβ if set,mount_fusefswill ignore unknown mount options.MOUNT_FUSEFS_CALL_BY_LIBβ adjusts behavior to the needs of the FUSE library. currently it affects help output.
although the following variables don't have any effect on mount_fusefs itself, they do affect the behaviour of fuse daemons:
FUSE_DEV_NAMEβ device to attach. if not set, the multiplexer path/dev/fuseis used.FUSE_DEV_FDβ file descriptor of an opened Fuse device to use. overridesFUSE_DEV_NAME. boss move.FUSE_NO_MOUNTβ if set, the library will not attempt to mount the filesystem, even if a mountpoint argument is supplied.
π FILES
/dev/fuseβ Fuse device with which the kernel and Fuse daemons can communicate. π«Ά/dev/fuseβ the multiplexer path. anopen(2)performed on it is automatically passed to a free Fuse device by the kernel (which might be created just for this purpose). yes it's listed twice, that's how the original rolls, don't come for me π
β EXAMPLES
mount the example filesystem in the Fuse distribution (from its directory): either
./fusexmp /mnt/fuse
or
mount_fusefs auto /mnt/fuse ./fusexmp
doing the same in two steps, using /dev/fuse0:
FUSE_DEV_NAME=/dev/fuse ./fusexmp &&
mount_fusefs /dev/fuse /mnt/fuse
a script wrapper for fusexmp which ensures that mount_fusefs does not call any external utility and also provides a hacky (non race-free) automatic device selection:
#!/bin/sh -e
FUSE_DEV_NAME=/dev/fuse fusexmp
mount_fusefs -S /dev/fuse /mnt/fuse β$@β
π SEE ALSO
fstat(1), mount(8), sudo(8) (ports/security/sudo), umount(8)
π§ HISTORY
mount_fusefs was written as part of the FreeBSD implementation of the Fuse userspace filesystem framework (see https://github.com/libfuse/libfuse) and first appeared in the sysutils/fusefs-kmod port, supporting FreeBSD 6.0. it was added to the base system in FreeBSD 10.0. glow-up complete β¨
π CAVEATS
this user interface is FreeBSD specific. secondary mounts should be unmounted via their device name. if an attempt is made to unmount them via their filesystem root path, the unmount request will be forwarded to the primary mount path. in general, unmounting by device name is less error-prone than by mount path (although the latter will also work under normal circumstances). so like, device name. do it. π
if the daemon is specified via the -D and -O options, it will be invoked via system(3), and the daemon's command line will also have an & control operator appended, so that we don't have to wait for its termination. you should use a simple command line when invoking the daemon via these options. keep it simple bestie, no cap.
π BUGS
special is treated as a multiplexer if and only if it is literally the same as auto or /dev/fuse. other paths which are equivalent with /dev/fuse (eg., /../dev/fuse) are not. literal means literal, she does not do vibes-based path matching π
and that's the whole page, bestie! go mount something iconic. π¦π
big cute sign-off: this page is from the Debian edition, dated October 9, 2021, and it's literally the MOUNT_FUSEFS(8) page from the System Manager's Manual. mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1980, 1989, 1991, 1993 The Regents of the University of California
- Copyright (c) 2005, 2006 Csaba Henk
- Copyright (c) 2019 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms