1 .\" Copyright (c) 1980, 1989, 1991, 1993
2 .\" The Regents of the University of California.
3 .\" Copyright (c) 2005, 2006 Csaba Henk
4 .\" All rights reserved.
6 .\" Copyright (c) 2019 The FreeBSD Foundation
8 .\" Portions of this documentation were written by BFF Storage Systems under
9 .\" sponsorship from the FreeBSD Foundation.
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\" notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
19 .\" 3. Neither the name of the University nor the names of its contributors
20 .\" may be used to endorse or promote products derived from this software
21 .\" without specific prior written permission.
23 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 .Nd mount a Fuse file system daemon
48 .Op Fl D Ar fuse_daemon
49 .Op Fl O Ar daemon_opts
54 .Op Fl o Ar option ...
56 .Op Ar fuse_daemon ...
58 Basic usage is to start a fuse daemon on the given
61 In practice, the daemon is assigned a
63 file automatically, which can then be indentified via
65 That special file can then be mounted by
68 However, the procedure of spawning a daemon will usually be automated
69 so that it is performed by
71 If the command invoking a given
73 is appended to the list of arguments,
80 will be instructed to attach itself to
82 From that on mounting goes as in the simple case. (See
87 argument will normally be treated as the path of the special file to mount.
95 will look for a suitable free fuse device by itself.
99 is an integer it will be interpreted as the number
100 of the file descriptor of an already open fuse device
101 (used when the Fuse library invokes
104 .Sx DAEMON MOUNTS ) .
106 The options are as follows:
107 .Bl -tag -width indent
108 .It Fl A , Ic --reject-allow_other
112 Intended for use in scripts and the
116 Run in safe mode (i.e., reject invoking a filesystem daemon).
119 .It Fl D , Ic --daemon Ar daemon
122 .It Fl O , Ic --daemon_opts Ar opts
125 to the daemon's command line.
126 .It Fl s , Ic --special Ar special
130 .It Fl m , Ic --mountpath Ar node
135 .It Fl V , Ic --version
136 Show version information.
138 Mount options are specified via
140 The following options are available (and also their negated versions,
141 by prefixing them with
143 .Bl -tag -width indent
146 .Sx STRICT ACCESS POLICY .
147 Only root can use this option.
149 I/O to the file system may be done asynchronously.
150 Writes may be delayed and/or reordered.
151 .It Cm default_permissions
152 Enable traditional (file mode based) permission checking in kernel.
154 Allow signals to interrupt operations that are blocked waiting for a reply from the server.
155 When this option is in use, system calls may fail with
157 whenever a signal is received.
158 .It Cm max_read Ns = Ns Ar n
159 Limit size of read requests to
161 .It Cm neglect_shares
162 Do not refuse unmounting if there are secondary mounts.
164 Refuse shared mounting of the daemon.
165 This is the default behaviour, to allow sharing, explicitly use
167 .It Cm push_symlinks_in
168 Prefix absolute symlinks with the mountpoint.
169 .It Cm subtype Ns = Ns Ar fsname
172 to the file system name as reported by
174 This option can be used to identify the file system implemented by
179 Besides the above mount options, there is a set of pseudo-mount options which
180 are supported by the Fuse library.
181 One can list these by passing
184 Most of these options only have affect on the behavior of the daemon (that is,
185 their scope is limited to userspace).
186 However, there are some which do require in-kernel support.
187 Currently the options supported by the kernel are:
188 .Bl -tag -width indent
190 Bypass the buffer cache system.
192 By default cached buffers of a given file are flushed at each
194 This option disables this behaviour.
197 Usually users do not need to use
199 directly, as the Fuse library enables Fuse daemons to invoke
203 .Dl fuse_daemon device mountpoint
205 has the same effect as
207 .Dl mount_fusefs auto mountpoint fuse_daemon
209 This is the recommended usage when you want basic usage
210 (eg, run the daemon at a low privilege level but mount it as root).
211 .Sh STRICT ACCESS POLICY
212 The strict access policy for Fuse filesystems lets one to use the filesystem
213 only if the filesystem daemon has the same credentials (uid, real uid, gid,
214 real gid) as the user.
216 This is applied for Fuse mounts by default and only root can mount without
217 the strict access policy (i.e., the
221 This is to shield users from the daemon
223 on their I/O activities.
225 Users might opt to willingly relax strict access policy (as far they
226 are concerned) by doing their own secondary mount (See
227 .Sx SHARED MOUNTS ) .
229 A Fuse daemon can be shared (i.e., mounted multiple times).
230 When doing the first (primary) mount, the spawner and the mounter of the daemon
231 must have the same uid, or the mounter should be the superuser.
233 After the primary mount is in place, secondary mounts can be done by anyone
234 unless this feature is disabled by
236 The behaviour of a secondary mount is analogous to that of symbolic
237 links: they redirect all filesystem operations to the primary mount.
239 Doing a secondary mount is like signing an agreement: by this action, the mounter
240 agrees that the Fuse daemon can trace her I/O activities.
241 From then on she is not banned from using the filesystem
242 (either via her own mount or via the primary mount), regardless whether
246 The device name of a secondary mount is the device name of the corresponding
247 primary mount, followed by a '#' character and the index of the secondary
251 System administrators might want to use a custom mount policy (ie., one going
255 The primary tool for such purposes is
259 is capable of invoking an arbitrary program, one must be careful when doing this.
261 is designed in a way such that it makes that easy.
262 For this purpose, there are options which disable certain risky features (
266 and command line parsing is done in a flexible way: mixing options and
267 non-options is allowed, but processing them stops at the third non-option
268 argument (after the first two has been utilized as device and mountpoint).
269 The rest of the command line specifies the daemon and its arguments.
270 (Alternatively, the daemon, the special and the mount path can be
271 specified using the respective options.) Note that
273 ignores the environment variable
275 and always behaves as described.
277 In general, to be as scripting /
279 friendly as possible, no information has a fixed
280 position in the command line, but once a given piece of information is
281 provided, subsequent arguments/options cannot override it (with the
282 exception of some non-critical ones).
284 .Bl -tag -width ".Ev MOUNT_FUSEFS_SAFE"
285 .It Ev MOUNT_FUSEFS_SAFE
286 This has the same effect as the
289 .It Ev MOUNT_FUSEFS_VERBOSE
290 This has the same effect as the
293 .It Ev MOUNT_FUSEFS_IGNORE_UNKNOWN
296 will ignore unknown mount options.
297 .It Ev MOUNT_FUSEFS_CALL_BY_LIB
298 Adjust behavior to the needs of the FUSE library.
299 Currently it effects help output.
302 Although the following variables do not have any effect on
304 itself, they affect the behaviour of fuse daemons:
305 .Bl -tag -width ".Ev FUSE_DEV_NAME"
308 If not set, the multiplexer path
312 File descriptor of an opened Fuse device to use.
316 If set, the library will not attempt to mount the filesystem, even
317 if a mountpoint argument is supplied.
320 .Bl -tag -width /dev/fuse
322 Fuse device with which the kernel and Fuse daemons can communicate.
324 The multiplexer path.
327 performed on it automatically is passed to a free Fuse device by the kernel
328 (which might be created just for this puprose).
331 Mount the example filesystem in the Fuse distribution (from its directory):
334 .Dl ./fusexmp /mnt/fuse
338 .Dl mount_fusefs auto /mnt/fuse ./fusexmp
340 Doing the same in two steps, using
343 .Dl FUSE_DEV_NAME=/dev/fuse ./fusexmp &&
344 .Dl mount_fusefs /dev/fuse /mnt/fuse
346 A script wrapper for fusexmp which ensures that
348 does not call any external utility and also provides a hacky
349 (non race-free) automatic device selection:
353 .Dl FUSE_DEV_NAME=/dev/fuse fusexmp
354 .Dl mount_fusefs -S /dev/fuse /mnt/fuse \(lq$@\(rq
362 was written as the part of the
364 implementation of the Fuse userspace filesystem framework (see
365 .Lk https://github.com/libfuse/libfuse )
366 and first appeared in the
367 .Pa sysutils/fusefs-kmod
370 It was added to the base system in
373 This user interface is
376 Secondary mounts should be unmounted via their device name.
377 If an attempt is made to unmount them via their filesystem root path,
378 the unmount request will be forwarded to the primary mount path.
379 In general, unmounting by device name is less error-prone than by mount path
380 (although the latter will also work under normal circumstances).
382 If the daemon is specified via the
386 options, it will be invoked via
388 and the daemon's command line will also have an
390 control operator appended, so that we do not have to wait for its termination.
391 You should use a simple command line when invoking the daemon via these options.
394 is treated as a multiplexer if and only if it is literally the same as
398 Other paths which are equivalent with