1*477ebe4aSjmc.\" $OpenBSD: fuse_mount.3,v 1.2 2018/07/08 06:17:10 jmc Exp $ 28e7147f2Shelg.\" 38e7147f2Shelg.\" Copyright (c) 2018 Helg Bredow <helg@openbsd.org> 48e7147f2Shelg.\" 58e7147f2Shelg.\" Permission to use, copy, modify, and distribute this software for any 68e7147f2Shelg.\" purpose with or without fee is hereby granted, provided that the above 78e7147f2Shelg.\" copyright notice and this permission notice appear in all copies. .\" 88e7147f2Shelg.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98e7147f2Shelg.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108e7147f2Shelg.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 118e7147f2Shelg.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128e7147f2Shelg.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 138e7147f2Shelg.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 148e7147f2Shelg.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158e7147f2Shelg.\" 168e7147f2Shelg.Dd $Mdocdate: July 8 2018 $ 178e7147f2Shelg.Dt FUSE_MOUNT 3 188e7147f2Shelg.Os 198e7147f2Shelg.Sh NAME 208e7147f2Shelg.Nm fuse_mount , 218e7147f2Shelg.Nm fuse_unmount 22*477ebe4aSjmc.Nd mount or dismount a FUSE file system 238e7147f2Shelg.Sh SYNOPSIS 248e7147f2Shelg.In fuse.h 258e7147f2Shelg.Ft struct fuse_chan * 268e7147f2Shelg.Fn fuse_mount "const char *dir" "struct fuse_args *args" 278e7147f2Shelg.Ft void 288e7147f2Shelg.Fn fuse_unmount "const char *dir" "struct fuse_chan *ch" 298e7147f2Shelg.Sh DESCRIPTION 308e7147f2ShelgThe 318e7147f2Shelg.Fn fuse_mount 32*477ebe4aSjmcfunction calls the 338e7147f2Shelg.Xr mount 2 348e7147f2Shelgsystem call to graft the FUSE file system on to the file system tree 358e7147f2Shelgat the point 368e7147f2Shelg.Fa dir . 378e7147f2Shelg.Fa args 388e7147f2Shelgare FUSE specific mount options as documented by 398e7147f2Shelg.Xr mount 2 . 408e7147f2Shelg.Pp 418e7147f2ShelgThe following mount options can be specified by preceding them with 42*477ebe4aSjmc.Fl o , 43*477ebe4aSjmceither individually or together separated by a comma. 448e7147f2Shelg.Bl -tag -width Ds 458e7147f2Shelg.It allow_other 46*477ebe4aSjmcAllow other users to access the file system. 47*477ebe4aSjmcBy default, FUSE will prevent other users from accessing the file system or to 488e7147f2Shelg.Xr statfs 2 49*477ebe4aSjmcthe file system. 50*477ebe4aSjmcThis security measure is particularly important for 51*477ebe4aSjmcnetwork file system that may expose private files. 52*477ebe4aSjmcIt also guards against system processes being blocked indefinitely 53*477ebe4aSjmcif the file system stops responding. 548e7147f2Shelg.It default_permissions 558e7147f2ShelgRequest that the kernel enforce file access permissions. 568e7147f2ShelgAlternatively, FUSE file systems can choose to implement access 57*477ebe4aSjmcchecks internally. 58*477ebe4aSjmcOn 59*477ebe4aSjmc.Ox , 60*477ebe4aSjmcthis option is always set. 618e7147f2Shelg.It kernel_cache 62*477ebe4aSjmcEnables buffering of files in the kernel. 63*477ebe4aSjmcNot recommended for file systems that can be updated external to FUSE, 64*477ebe4aSjmcsuch as network file systems. 65*477ebe4aSjmcNot implemented. 668e7147f2Shelg.It max_read=%u 67*477ebe4aSjmcSpecify the maximum size of read operations. 68*477ebe4aSjmcNote that the kernel limits this to FUSEBUFMAXSIZE. 69*477ebe4aSjmcThis option should not be specified on the command line. 70*477ebe4aSjmcThe correct (or optimum) value depends on the filesystem implementation 71*477ebe4aSjmcand should thus be specified by the filesystem internally. 728e7147f2Shelg.It ro 73*477ebe4aSjmcMount the file system read-only. 74*477ebe4aSjmcCan also be specified by itself with 75*477ebe4aSjmc.Fl r . 768e7147f2Shelg.El 778e7147f2Shelg.Pp 788e7147f2Shelg.Fn fuse_unmount 798e7147f2Shelgwill attempt to unmount the file system mounted at 808e7147f2Shelg.Fa dir 818e7147f2Shelgby calling the 828e7147f2Shelg.Xr unmount 2 83*477ebe4aSjmcsystem call. 84*477ebe4aSjmcIf this is successful, the kernel will send the 858e7147f2ShelgFBT_DESTROY message to the file system, causing 86*477ebe4aSjmc.Xr fuse_loop 3 87*477ebe4aSjmcto terminate. 88*477ebe4aSjmcThere is no way to determine whether this call was successful. 898e7147f2Shelg.Pp 908e7147f2ShelgOnly the super user can mount and unmount FUSE file systems. 918e7147f2Shelg.Sh RETURN VALUES 928e7147f2Shelg.Fn fuse_main 938e7147f2Shelgwill return NULL if the file system cannot be mounted. 948e7147f2Shelg.Sh ERRORS 958e7147f2Shelg.Fn fuse_mount 968e7147f2Shelgwill fail when one of the following occurs: 978e7147f2Shelg.Fa dir 988e7147f2Shelgdoes not exist or is not a directory. 998e7147f2ShelgThe fuse device cannot be opened for reading and writing. 1008e7147f2ShelgThere was an error parsing the options specified by 1018e7147f2Shelg.Fa args . 1028e7147f2ShelgThe file system could not be mounted. 1038e7147f2Shelg.Sh SEE ALSO 1048e7147f2Shelg.Xr mount 2 , 1058e7147f2Shelg.Xr fuse_main 3 , 1068e7147f2Shelg.Xr fuse_setup 3 , 1078e7147f2Shelg.Xr fuse 4 1088e7147f2Shelg.Sh STANDARDS 1098e7147f2ShelgThe 1108e7147f2Shelg.Fn fuse_mount 1118e7147f2Shelgand 1128e7147f2Shelg.Fn fuse_unmount 1138e7147f2Shelgfunctions conforms to FUSE 2.6. 1148e7147f2Shelg.Sh HISTORY 1158e7147f2ShelgThe 1168e7147f2Shelg.Fn fuse_mount 1178e7147f2Shelgand 1188e7147f2Shelg.Fn fuse_unmount 1198e7147f2Shelgfunctions first appeared in 1208e7147f2Shelg.Ox 5.4 . 1218e7147f2Shelg.Sh AUTHORS 1228e7147f2Shelg.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com 1238e7147f2Shelg.An Helg Bredow Aq Mt helg@openbsd.org 124