xref: /openbsd/lib/libfuse/fuse_mount.3 (revision 4cfece93)
1.\" $OpenBSD: fuse_mount.3,v 1.2 2018/07/08 06:17:10 jmc Exp $
2.\"
3.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.  .\"
8.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15.\"
16.Dd $Mdocdate: July 8 2018 $
17.Dt FUSE_MOUNT 3
18.Os
19.Sh NAME
20.Nm fuse_mount ,
21.Nm fuse_unmount
22.Nd mount or dismount a FUSE file system
23.Sh SYNOPSIS
24.In fuse.h
25.Ft struct fuse_chan *
26.Fn fuse_mount "const char *dir" "struct fuse_args *args"
27.Ft void
28.Fn fuse_unmount "const char *dir" "struct fuse_chan *ch"
29.Sh DESCRIPTION
30The
31.Fn fuse_mount
32function calls the
33.Xr mount 2
34system call to graft the FUSE file system on to the file system tree
35at the point
36.Fa dir .
37.Fa args
38are FUSE specific mount options as documented by
39.Xr mount 2 .
40.Pp
41The following mount options can be specified by preceding them with
42.Fl o ,
43either individually or together separated by a comma.
44.Bl -tag -width Ds
45.It allow_other
46Allow other users to access the file system.
47By default, FUSE will prevent other users from accessing the file system or to
48.Xr statfs 2
49the file system.
50This security measure is particularly important for
51network file system that may expose private files.
52It also guards against system processes being blocked indefinitely
53if the file system stops responding.
54.It default_permissions
55Request that the kernel enforce file access permissions.
56Alternatively, FUSE file systems can choose to implement access
57checks internally.
58On
59.Ox ,
60this option is always set.
61.It kernel_cache
62Enables buffering of files in the kernel.
63Not recommended for file systems that can be updated external to FUSE,
64such as network file systems.
65Not implemented.
66.It max_read=%u
67Specify the maximum size of read operations.
68Note that the kernel limits this to FUSEBUFMAXSIZE.
69This option should not be specified on the command line.
70The correct (or optimum) value depends on the filesystem implementation
71and should thus be specified by the filesystem internally.
72.It ro
73Mount the file system read-only.
74Can also be specified by itself with
75.Fl r .
76.El
77.Pp
78.Fn fuse_unmount
79will attempt to unmount the file system mounted at
80.Fa dir
81by calling the
82.Xr unmount 2
83system call.
84If this is successful, the kernel will send the
85FBT_DESTROY message to the file system, causing
86.Xr fuse_loop 3
87to terminate.
88There is no way to determine whether this call was successful.
89.Pp
90Only the super user can mount and unmount FUSE file systems.
91.Sh RETURN VALUES
92.Fn fuse_main
93will return NULL if the file system cannot be mounted.
94.Sh ERRORS
95.Fn fuse_mount
96will fail when one of the following occurs:
97.Fa dir
98does not exist or is not a directory.
99The fuse device cannot be opened for reading and writing.
100There was an error parsing the options specified by
101.Fa args .
102The file system could not be mounted.
103.Sh SEE ALSO
104.Xr mount 2 ,
105.Xr fuse_main 3 ,
106.Xr fuse_setup 3 ,
107.Xr fuse 4
108.Sh STANDARDS
109The
110.Fn fuse_mount
111and
112.Fn fuse_unmount
113functions conforms to FUSE 2.6.
114.Sh HISTORY
115The
116.Fn fuse_mount
117and
118.Fn fuse_unmount
119functions first appeared in
120.Ox 5.4 .
121.Sh AUTHORS
122.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com
123.An Helg Bredow Aq Mt helg@openbsd.org
124