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 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .Nd mount a Fuse file system daemon
43 .Op Fl D Ar fuse_daemon
44 .Op Fl O Ar daemon_opts
49 .Op Fl o Ar option ...
51 .Op Ar fuse_daemon ...
53 Basic usage is to start a fuse daemon on the given
56 In practice, the daemon is assigned a
58 file automatically, which can then be indentified via
60 That special file can then be mounted by
63 However, the procedure of spawning a daemon will usually be automated
64 so that it is performed by
66 If the command invoking a given
68 is appended to the list of arguments,
75 will be instructed to attach itself to
77 From that on mounting goes as in the simple case. (See
82 argument will normally be treated as the path of the special file to mount.
90 will look for a suitable free fuse device by itself.
94 is an integer it will be interpreted as the number
95 of the file descriptor of an already open fuse device
96 (used when the Fuse library invokes
101 The options are as follows:
102 .Bl -tag -width indent
103 .It Fl A , Ic --reject-allow_other
107 Intended for use in scripts and the
111 Run in safe mode (i.e. reject invoking a filesystem daemon)
114 .It Fl D, Ic --daemon Ar daemon
117 .It Fl O, Ic --daemon_opts Ar opts
120 to the daemon's command line
121 .It Fl s, Ic --special Ar special
125 .It Fl m, Ic --mountpath Ar node
130 .It Fl V, Ic --version
131 Show version information
133 Mount options are specified via
135 The following options are available (and also their negated versions,
136 by prefixing them with
138 .Bl -tag -width indent
139 .It Cm default_permissions
140 Enable traditional (file mode based) permission checking in kernel
143 .Sx STRICT ACCESS POLICY .
144 Only root can use this option
145 .It Cm max_read Ns = Ns Ar n
146 Limit size of read requests to
149 Refuse shared mounting of the daemon.
150 This is the default behaviour, to allow sharing, expicitly use
152 .It Cm neglect_shares
153 Do not refuse unmounting if there are secondary mounts
154 .It Cm push_symlinks_in
155 Prefix absolute symlinks with the mountpoint
156 .It Cm subtype Ns = Ns Ar fsname
159 to the file system name as reported by
161 This option can be used to identify the file system implemented by
166 Besides the above mount options, there is a set of pseudo-mount options which
167 are supported by the Fuse library.
168 One can list these by passing
171 Most of these options only have affect on the behavior of the daemon (that is,
172 their scope is limited to userspace).
173 However, there are some which do require in-kernel support.
174 Currently the options supported by the kernel are:
175 .Bl -tag -width indent
177 Bypass the buffer cache system
179 By default cached buffers of a given file are flushed at each
181 This option disables this behaviour
184 Usually users do not need to use
186 directly, as the Fuse library enables Fuse daemons to invoke
190 .Dl fuse_daemon device mountpoint
192 has the same effect as
194 .Dl mount_fusefs auto mountpoint fuse_daemon
196 This is the recommended usage when you want basic usage
197 (eg, run the daemon at a low privilege level but mount it as root).
198 .Sh STRICT ACCESS POLICY
199 The strict access policy for Fuse filesystems lets one to use the filesystem
200 only if the filesystem daemon has the same credentials (uid, real uid, gid,
201 real gid) as the user.
203 This is applied for Fuse mounts by default and only root can mount without
204 the strict access policy (i.e. the
208 This is to shield users from the daemon
210 on their I/O activities.
212 Users might opt to willingly relax strict access policy (as far they
213 are concerned) by doing their own secondary mount (See
214 .Sx SHARED MOUNTS ) .
216 A Fuse daemon can be shared (i.e. mounted multiple times).
217 When doing the first (primary) mount, the spawner and the mounter of the daemon
218 must have the same uid, or the mounter should be the superuser.
220 After the primary mount is in place, secondary mounts can be done by anyone
221 unless this feature is disabled by
223 The behaviour of a secondary mount is analogous to that of symbolic
224 links: they redirect all filesystem operations to the primary mount.
226 Doing a secondary mount is like signing an agreement: by this action, the mounter
227 agrees that the Fuse daemon can trace her I/O activities.
228 From then on she is not banned from using the filesystem
229 (either via her own mount or via the primary mount), regardless whether
233 The device name of a secondary mount is the device name of the corresponding
234 primary mount, followed by a '#' character and the index of the secondary
238 System administrators might want to use a custom mount policy (ie., one going
242 The primary tool for such purposes is
246 is capable of invoking an arbitrary program, one must be careful when doing this.
248 is designed in a way such that it makes that easy.
249 For this purpose, there are options which disable certain risky features (i.e.
253 and command line parsing is done in a flexible way: mixing options and
254 non-options is allowed, but processing them stops at the third non-option
255 argument (after the first two has been utilized as device and mountpoint).
256 The rest of the command line specifies the daemon and its arguments.
257 (Alternatively, the daemon, the special and the mount path can be
258 specified using the respective options.) Note that
260 ignores the environment variable
262 and always behaves as described.
264 In general, to be as scripting /
266 friendly as possible, no information has a fixed
267 position in the command line, but once a given piece of information is
268 provided, subsequent arguments/options cannot override it (with the
269 exception of some non-critical ones).
271 .Bl -tag -width ".Ev MOUNT_FUSEFS_SAFE"
272 .It Ev MOUNT_FUSEFS_SAFE
273 This has the same effect as the
276 .It Ev MOUNT_FUSEFS_VERBOSE
277 This has the same effect as the
280 .It Ev MOUNT_FUSEFS_IGNORE_UNKNOWN
283 will ignore uknown mount options.
284 .It Ev MOUNT_FUSEFS_CALL_BY_LIB
285 Adjust behavior to the needs of the FUSE library.
286 Currently it effects help output.
289 Although the following variables do not have any effect on
291 itself, they affect the behaviour of fuse daemons:
292 .Bl -tag -width ".Ev FUSE_DEV_NAME"
295 If not set, the multiplexer path
299 File desciptor of an opened Fuse device to use.
303 If set, the library will not attempt to mount the filesystem, even
304 if a mountpoint argument is supplied.
307 .Bl -tag -width /dev/fuse
309 Fuse device with which the kernel and Fuse daemons can communicate.
311 The multiplexer path.
314 performed on it automatically is passed to a free Fuse device by the kernel
315 (which might be created just for this puprose).
318 Mount the example filesystem in the Fuse distribution (from its directory):
321 .Dl ./fusexmp /mnt/fuse
325 .Dl mount_fusefs auto /mnt/fuse ./fusexmp
327 Doing the same in two steps, using
330 .Dl FUSE_DEV_NAME=/dev/fuse ./fusexmp &&
331 .Dl mount_fusefs /dev/fuse /mnt/fuse
333 A script wrapper for fusexmp which ensures that
335 does not call any external utility and also provides a hacky
336 (non race-free) automatic device selection:
340 .Dl FUSE_DEV_NAME=/dev/fuse fusexmp
341 .Dl mount_fusefs -S /dev/fuse /mnt/fuse \(lq$@\(rq
349 was written as the part of the
351 implementation of the Fuse userspace filesystem framework (see
352 .Xr https://github.com/libfuse/libfuse )
353 and first appeared in the
354 .Pa sysutils/fusefs-kmod
357 It was added to the base system in
360 This user interface is
363 Secondary mounts should be unmounted via their device name.
364 If an attempt is made to unmount them via their filesystem root path,
365 the unmount request will be forwarded to the primary mount path.
366 In general, unmounting by device name is less error-prone than by mount path
367 (although the latter will also work under normal circumstances).
369 If the daemon is specified via the
373 options, it will be invoked via
375 and the daemon's command line will also have an
377 control operator appended, so that we do not have to wait for its termination.
378 You should use a simple command line when invoking the daemon via these options.
381 is treated as a multiplexer if and only if it is literally the same as
385 Other paths which are equivalent with