.PHONY: setuid_fusermount
setuid_fusermount:
- @echo "Attempting to use sudo to make util/fusermount setuid root"
+ @echo "Attempting to use sudo to make util/fusermount3 setuid root"
@echo "If this fails, set permissions manually and re-run make test"
test $$(ls -n util/fusermount3 | awk 'NR==1 {print $$3}') -eq 0 || \
sudo chown root util/fusermount3
test -u util/fusermount3 || \
sudo chmod u+s util/fusermount3
-# If we are not root, util/fusermount needs to be setuid root
+# If we are not root, util/fusermount3 needs to be setuid root
# for tests to work.
test_deps = $(shell [ "$${UID}" -eq 0 ] || echo setuid_fusermount)
Security implications
---------------------
-If you run `make install`, the *fusermount* program is installed
+If you run `make install`, the *fusermount3* program is installed
set-user-id to root. This is done to allow normal users to mount
their own filesystem implementations.
## Process this file with automake to produce Makefile.in
-dist_man_MANS = fusermount.1 mount.fuse.8
+dist_man_MANS = fusermount3.1 mount.fuse.8
EXTRA_DIST = kernel.txt Doxyfile html README.NFS
+++ /dev/null
-.TH FUSERMOUNT 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)"
-
-.SH NAME
-\fBfusermount\fR \- mount and unmount FUSE filesystems
-
-.SH SYNOPSIS
-\fBfusermount\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR
-
-.SH DESCRIPTION
-Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
-.PP
-\fBfusermount\fR is a program to mount and unmount FUSE
-filesystems. It should be called directly only for unmounting FUSE
-file systems. To allow mounting and unmounting by unprivileged users,
-\fBfusermount\fR needs to be installed set-uid root.
-.SH OPTIONS
-.IP "\-h" 4
-print help.
-.IP "\-V" 4
-print version.
-.IP "-o \fIOPTION\fR[,\fIOPTION\fR...]" 4
-mount options.
-.IP "-u" 4
-unmount.
-.IP "-q" 4
-quiet.
-.IP "-z" 4
-lazy unmount.
-
-.SH SEE ALSO
-\fImount\fR(8),
-\fImount.fuse\fR(8),
-
-.SH HOMEPAGE
-More information about fusermount and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>.
-
-.SH AUTHORS
-.LP
-FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
-.LP
-The original author of FUSE is Miklos Szeredi <\fImiklos@szeredi.hu\fR>.
-.LP
-This manual page was originally written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>.
--- /dev/null
+.TH FUSERMOUNT3 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)"
+
+.SH NAME
+\fBfusermount3\fR \- mount and unmount FUSE filesystems
+
+.SH SYNOPSIS
+\fBfusermount3\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR
+
+.SH DESCRIPTION
+Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
+.PP
+\fBfusermount3\fR is a program to mount and unmount FUSE
+filesystems. It should be called directly only for unmounting FUSE
+file systems. To allow mounting and unmounting by unprivileged users,
+\fBfusermount3\fR needs to be installed set-uid root.
+.SH OPTIONS
+.IP "\-h" 4
+print help.
+.IP "\-V" 4
+print version.
+.IP "-o \fIOPTION\fR[,\fIOPTION\fR...]" 4
+mount options.
+.IP "-u" 4
+unmount.
+.IP "-q" 4
+quiet.
+.IP "-z" 4
+lazy unmount.
+
+.SH SEE ALSO
+\fImount\fR(8),
+\fImount.fuse\fR(8),
+
+.SH HOMEPAGE
+More information about fusermount3 and the FUSE project can be found at <\fIhttp://fuse.sourceforge.net/\fR>.
+
+.SH AUTHORS
+.LP
+FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
+.LP
+The original author of FUSE is Miklos Szeredi <\fImiklos@szeredi.hu\fR>.
+.LP
+This manual page was originally written by Daniel Baumann <\fIdaniel.baumann@progress\-technologies.net\fR>.
FUSE is a userspace filesystem framework. It consists of a kernel
module (fuse.ko), a userspace library (libfuse.*) and a mount utility
-(fusermount).
+(fusermount3).
One of the most important features of FUSE is allowing secure,
non-privileged mounts. This opens up new possibilities for the use of
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since the mount() system call is a privileged operation, a helper
-program (fusermount) is needed, which is installed setuid root.
+program (fusermount3) is needed, which is installed setuid root.
The implication of providing non-privileged mounts is that the mount
owner must not be able to use this capability to compromise the
The solution is not to allow opening device files and ignore
setuid and setgid bits when executing programs. To ensure this
- fusermount always adds "nosuid" and "nodev" to the mount options
+ fusermount3 always adds "nosuid" and "nodev" to the mount options
for non-privileged mounts.
B) If another user is accessing files or directories in the
owner could otherwise not be able to modify (or could only
make limited modifications).
- This is solved in fusermount, by checking the access
+ This is solved in fusermount3, by checking the access
permissions on the mountpoint and only allowing the mount if
the mount owner can do unlimited modification (has write
access to the mountpoint, and mountpoint is not a "sticky"
\fBlibfuse\fP
The shared library that most (user-space) filesystems use to
communicate with FUSE (the kernel filesystem). libfuse also provides
-the \fBfusermount\fP helper to allow non-privileged users to mount
-filesystems.
+the \fBfusermount3\fP (or \fBfusermount\fP if you have older version of
+libfuse) helper to allow non-privileged users to mount filesystems.
.TP
\fBfilesystem owner\fP
The user that starts the filesystem and instructs the kernel to
associate it with a particular mountpoint. The latter is typically done
by the filesystem itself on start-up. When using libfuse, this is done
-by calling the \fBfusermount\fP utility.
+by calling the \fBfusermount3\fP utility.
.TP
\fBclient\fP
Any process that interacts with the mountpoint.
Allow non-root users to specify the \fBallow_other\fP or
\fBallow_root\fP mount options (see below).
.TP
-These limits are enforced by the \fBfusermount\fP helper, so they can be avoided by filesystems that run as root.
+These limits are enforced by the \fBfusermount3\fP helper, so they can be avoided by filesystems that run as root.
.SH OPTIONS
Most of the generic mount options described in \fBmount\fP are
supported (\fBro\fP, \fBrw\fP, \fBsuid\fP, \fBnosuid\fP, \fBdev\fP,
\fBnorellinks\fP
Do not transform absolute symlinks into relative. This is the default.
.SH SECURITY
-The fusermount program is installed set-user-gid to fuse. This is done to allow users from fuse group to mount
+The fusermount3 program is installed set-user-gid to fuse. This is done to allow users from fuse group to mount
their own filesystem implementations.
There must however be some limitations, in order to prevent Bad User from
doing nasty things. Currently those limitations are:
.IP 3.
No other user (including root) can access the contents of the mounted filesystem.
.SH NOTE
-FUSE filesystems are unmounted using the \fBfusermount\fP(1) command (\fBfusermount -u mountpoint\fP).
+FUSE filesystems are unmounted using the \fBfusermount3\fP(1) command (\fBfusermount3 -u mountpoint\fP).
.SH "AUTHORS"
.LP
FUSE is currently maintained by Nikolaus Rath <Nikolaus@rath.org>
This man page was originally written by Bastien Roucaries <roucaries.bastien+debian@gmail.com> for the
Debian GNU/Linux distribution.
.SH SEE ALSO
-fusermount(1)
-mount(8)
+.BR fusermount3 (1)
+.BR fusermount (1)
+.BR mount (8)
snprintf(env, sizeof(env), "%i", fds[0]);
setenv(FUSE_COMMFD_ENV, env, 1);
exec_fusermount(argv);
- perror("fuse: failed to exec fusermount");
+ perror("fuse: failed to exec fusermount3");
_exit(1);
}
rv = receive_fd(fds[1]);
if (!mo->auto_unmount) {
- /* with auto_unmount option fusermount will not exit until
+ /* with auto_unmount option fusermount3 will not exit until
this socket is closed */
close(fds[1]);
waitpid(pid, NULL, 0); /* bury zombie */
}
if (mo->auto_unmount) {
- /* Tell the caller to fallback to fusermount because
+ /* Tell the caller to fallback to fusermount3 because
auto-unmount does not work otherwise. */
return -2;
}
if (res == -1) {
/*
* Maybe kernel doesn't support unprivileged mounts, in this
- * case try falling back to fusermount
+ * case try falling back to fusermount3
*/
if (errno == EPERM) {
res = -2;
stderr=subprocess.STDOUT)
def umount(mount_process, mnt_dir):
- # fusermount will be setuid root, so we can only trace it with
+ # fusermount3 will be setuid root, so we can only trace it with
# valgrind if we're root
if os.getuid() == 0:
cmdline = base_cmdline
base_cmdline = []
-# Try to use local fusermount
+# Try to use local fusermount3
os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'util'), os.environ['PATH'])
$(MKDIR_P) $(DESTDIR)$(MOUNT_FUSE_PATH)
$(INSTALL_PROGRAM) $(builddir)/mount.fuse3 $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse3
$(MKDIR_P) $(DESTDIR)$(INIT_D_PATH)
- $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
+ $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse3
@if test -x /usr/sbin/update-rc.d; then \
echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
install-data-local:
$(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH)
- $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse.rules
+ $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse3.rules
uninstall-local:
rm -f $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse3
}
/*
- * Check whether the file specified in "fusermount -u" is really a
+ * Check whether the file specified in "fusermount3 -u" is really a
* mountpoint and not a symlink. This is necessary otherwise the user
* could move the mountpoint away and replace it with a symlink
- * pointing to an arbitrary mount, thereby tricking fusermount into
+ * pointing to an arbitrary mount, thereby tricking fusermount3 into
* unmounting that (umount(2) will follow symlinks).
*
* This is the child process running in a separate mount namespace, so
if (getuid() != 0 && !user_allow_other &&
(opt_eq(s, len, "allow_other") ||
opt_eq(s, len, "allow_root"))) {
- fprintf(stderr, "%s: option %.*s only allowed if 'user_allow_other' is set in /etc/fuse.conf\n", progname, len, s);
+ fprintf(stderr, "%s: option %.*s only allowed if 'user_allow_other' is set in %s\n", progname, len, s, FUSE_CONF);
goto err;
}
if (!skip_option) {
if (getuid() != 0 && mount_max != -1) {
int mount_count = count_fuse_fs();
if (mount_count >= mount_max) {
- fprintf(stderr, "%s: too many FUSE filesystems mounted; mount_max=N can be set in /etc/fuse.conf\n", progname);
+ fprintf(stderr, "%s: too many FUSE filesystems mounted; mount_max=N can be set in %s\n", progname, FUSE_CONF);
goto fail_close_fd;
}
}
static void show_version(void)
{
- printf("fusermount version: %s\n", PACKAGE_VERSION);
+ printf("fusermount3 version: %s\n", PACKAGE_VERSION);
exit(0);
}
MOUNTPOINT=/sys/fs/fuse/connections
# Gracefully exit if the package has been removed.
-which fusermount &>/dev/null || exit 5
+which fusermount3 &>/dev/null || exit 5
case "$1" in
start|restart|force-reload)