用户空间文件系统

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Filesystem in Userspace and the translation is 25% complete.
Other languages:
Resources

Filesystem in Userspace (FUSE) provides a way for users to mount file systems without needing special permissions (mounting in Linux is generally reserved to those with administrative privileges).

安装

内核

KERNEL 启用 FUSE 支持
File systems  --->
    <*> FUSE (Filesystem in Userspace) support

USE flags

USE flags for sys-fs/fuse An interface for filesystems implemented in userspace

suid Enable setuid root program(s)
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)

Emerge

As with most file systems, after building support for the file system into the kernel be sure to install the user space tools:

root #emerge --ask sys-fs/fuse

Configuration

Files

The following configuration files are available for FUSE:

  • /etc/fuse.conf

There are two configuration variables available in the fuse.conf file:

  • mount_max - Sets the maximum number of FUSE mounts allowed to non-root users (defaults to 1000 if unset).
  • user_allow_other - Allows non-root users to specify the allow_other or allow_root mount options. This is disabled for security reasons.

Usage

Invocation

user $fusermount -h
fusermount: [options] mountpoint
Options:
 -h                 print help
 -V                 print version
 -o opt[,opt...]   mount options
 -u                 unmount
 -q                 quiet
 -z                 lazy unmount

Mounting filesystems

Use the fusermount command:

user $fusermount /path/to/mountpoint

Unmounting filesystems

Filesystems can be unmounted using either the umount or the fusermount command:

user $fusermount -u /path/to/mountpoint

Removal

root #emerge --ask --depclean --verbose sys-fs/fuse

See also

  • Filesystem — 意思是通过提供程序来储存、检索及更新数据来组织程序预期终止后要保留的数据,以及管理设备所包含的剩余空间。

External resources