libfuse
=======
About
-----
FUSE (Filesystem in Userspace) is an interface for userspace programs
to export a filesystem to the Linux kernel. The FUSE project consists
of two components: the *fuse* kernel module (maintained in the regular
kernel repositories) and the *libfuse* userspace library (maintained
in this repository). libfuse provides the reference implementation
for communicating with the FUSE kernel module.
A FUSE file system is typically implemented as a standalone
application that links with libfuse. libfuse provides functions to
mount the file system, unmount it, read requests from the kernel, and
send responses back. libfuse offers two APIs: a "high-level",
synchronous API, and a "low-level" asynchronous API. In both cases,
incoming requests from the kernel are passed to the main program using
callbacks. When using the high-level API, the callbacks may work with
file names and paths instead of inodes, and processing of a request
finishes when the callback function returns. When using the low-level
API, the callbacks must work with inodes and responses must be sent
explicitly using a separate set of API functions.
Supported Platforms
-------------------
* Linux (fully)
* BSD (mostly/best-effort)
* For OS-X, please use [OSXFUSE](https://osxfuse.github.io/)
Installation
------------
You can download libfuse from
https://github.com/libfuse/libfuse/releases. To build and install, we
recommend to use [Meson](http://mesonbuild.com/) (version 0.38 or
newer) and [Ninja](https://ninja-build.org). After extracting the
libfuse tarball, create a (temporary) build directory and run Meson:
$ md build; cd build
$ meson ..
Normally, the default build options will work fine. If you
nevertheless want to adjust them, you can do so with the *mesonconf*
command:
$ mesonconf # list options
$ mesonconf -D disable-mtab=true # set an option
To build, test and install libfuse, you then use Ninja:
$ ninja
$ sudo python3 -m pytest test/
$ sudo ninja install
Running the tests requires the [py.test](http://www.pytest.org/)
Python module. Instead of running the tests as root, the majority of
tests can also be run as a regular user if *util/fusermount3* is made
setuid root first:
$ sudo chown root:root util/fusermount3
$ sudo chmod 4755 util/fusermount3
$ python3 -m pytest test/
Alternate Installation
----------------------
If you are not able to use Meson and Ninja, please report this to the
libfuse mailing list. Until the problem is resolved, you may fall back
to an in-source build using autotools:
$ ./configure
$ make
$ sudo make install
Note that support for building with autotools may disappear at some
point, so if you depend on using autotools for some reason please let
the libfuse developers know!
Security implications
---------------------
The *fusermount3* program is installed setuid root. This is done to
allow normal users to mount their own filesystem implementations.
To limit the harm that malicious users can do this way, *fusermount3*
enforces the following limitations:
- The user can only mount on a mountpoint for which he has write
permission
- The mountpoint must not be a sticky directory which isn't owned by
the user (like /tmp usually is)
- No other user (including root) can access the contents of the
mounted filesystem (though this can be relaxed by allowing the use
of the *allow_other* and *allow_root* mount options in
*/etc/fuse.conf*)
If you intend to use the *allow_other* mount options, be aware that
FUSE has an unresolved [security
bug](https://github.com/libfuse/libfuse/issues/15): if the
*default_permissions* mount option is not used, the results of the
first permission check performed by the file system for a directory
entry will be re-used for subsequent accesses as long as the inode of
the accessed entry is present in the kernel cache - even if the
permissions have since changed, and even if the subsequent access is
made by a different user. This is of little concern if the filesystem
is accessible only to the mounting user (which has full access to the
filesystem anyway), but becomes a security issue when other users are
allowed to access the filesystem (since they can exploit this to
perform operations on the filesystem that they do not actually have
permissions for).
This bug needs to be fixed in the Linux kernel and has been known
since 2006 but unfortunately no fix has been applied yet. If you
depend on correct permission handling for FUSE file systems, the only
workaround is to use `default_permissions` (which does not currently
support ACLs), or to completely disable caching of directory entry
attributes.
Building your own filesystem
------------------------------
FUSE comes with several example file systems in the `examples`
directory. For example, the *passthrough* examples mirror the contents
of the root directory under the mountpoint. Start from there and adapt
the code!
The documentation of the API functions and necessary callbacks is
mostly contained in the files `include/fuse.h` (for the high-level
API) and `include/fuse_lowlevel.h` (for the low-level API). An
autogenerated html version of the API is available in the `doc/html`
directory and at http://libfuse.github.io/doxygen.
Getting Help
------------
If you need help, please ask on the <fuse-devel@lists.sourceforge.net>
mailing list (subscribe at
https://lists.sourceforge.net/lists/listinfo/fuse-devel).
Please report any bugs on the GitHub issue tracker at
https://github.com/libfuse/libfuse/issues.
Professional Support
--------------------
Professional support is available. Please contact Nikolaus Rath
<Nikolaus@rath.org> for details.
没有合适的资源?快使用搜索试试~ 我知道了~
fuse-3.1.1.tar.gz
需积分: 50 19 下载量 170 浏览量
2020-03-07
21:56:46
上传
评论
收藏 800KB GZ 举报
温馨提示
共196个文件
html:54个
c:36个
png:31个
安装脚本:./configure;make; make install 挂载:modprobe fuse 验证:lsmod|grep fuse
资源推荐
资源详情
资源评论
收起资源包目录
fuse-3.1.1.tar.gz (196个子文件)
fusermount3.1 1KB
mount.fuse.8 11KB
configure.ac 4KB
Makefile.am 2KB
Makefile.am 841B
Makefile.am 604B
Makefile.am 346B
Makefile.am 300B
Makefile.am 259B
Makefile.am 164B
AUTHORS 3KB
meson.build 3KB
meson.build 2KB
meson.build 1019B
meson.build 961B
meson.build 926B
meson.build 165B
meson.build 147B
fuse.c 107KB
fuse_lowlevel.c 71KB
test_syscalls.c 29KB
fusermount.c 27KB
iconv.c 16KB
subdir.c 14KB
passthrough_ll.c 14KB
mount.c 13KB
notify_store_retrieve.c 11KB
passthrough_fh.c 11KB
helper.c 11KB
notify_inval_inode.c 10KB
notify_inval_entry.c 9KB
fuse_opt.c 9KB
passthrough.c 9KB
cuse_lowlevel.c 9KB
mount_util.c 7KB
mount_util.c 7KB
fuse_loop_mt.c 7KB
cuse.c 7KB
buffer.c 6KB
poll.c 6KB
mount_bsd.c 6KB
test_write_cache.c 5KB
hello_ll.c 5KB
mount.fuse.c 4KB
ioctl.c 4KB
test_setattr.c 4KB
hello.c 4KB
cuse_client.c 3KB
null.c 3KB
fuse_signals.c 2KB
poll_client.c 2KB
ioctl_client.c 1KB
fuse_loop.c 796B
wrong_command.c 211B
compile 7KB
configure 476KB
COPYING 18KB
doxygen.css 27KB
tabs.css 9KB
depcomp 23KB
Doxyfile 50KB
fuse_versionscript 3KB
config.guess 43KB
fuse_lowlevel.h 60KB
fuse.h 40KB
fuse_common.h 22KB
fuse_kernel.h 17KB
fuse_opt.h 7KB
fuse_i.h 3KB
cuse_lowlevel.h 3KB
fuse_misc.h 2KB
ioctl.h 925B
mount_util.h 621B
fuse__lowlevel_8h.html 108KB
structfuse__lowlevel__ops.html 95KB
passthrough__ll_8c.html 58KB
structfuse__operations.html 55KB
passthrough__fh_8c.html 51KB
null_8c.html 51KB
fuse__common_8h.html 51KB
fuse_8h.html 46KB
passthrough_8c.html 38KB
notify__store__retrieve_8c.html 35KB
notify__inval__inode_8c.html 31KB
cuse_8c.html 28KB
notify__inval__entry_8c.html 28KB
fuse__opt_8h.html 26KB
poll_8c.html 25KB
structfuse__config.html 21KB
hello__ll_8c.html 21KB
functions.html 20KB
functions_vars.html 20KB
ioctl_8c.html 19KB
globals.html 18KB
hello_8c.html 17KB
structfuse__conn__info.html 14KB
cuse__client_8c.html 12KB
globals_func.html 12KB
structfuse__file__info.html 11KB
poll__client_8c.html 8KB
共 196 条
- 1
- 2
资源评论
Sunny_Future
- 粉丝: 7196
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功