blob: 009643c1eb707c771960659c609b8e981e7a288b [file] [log] [blame]
Miklos Szeredi8cffdb92001-11-09 14:49:18 +00001General Information
2===================
3
4FUSE (Filesystem in USErspace) is a simple interface for userspace
5programs to export a virtual filesystem to the linux kernel. FUSE
6also aims to provide a secure method for non privileged users to
7create and mount their own filesystem implementations.
8
9You can download the source code releases from
10
11 http://sourceforge.net/projects/avf
12
13or alternatively you can use CVS to get the very latest development
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000014version by setting the cvsroot to
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000015
16 :pserver:anonymous@cvs.avf.sourceforge.net:/cvsroot/avf
17
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000018and checking out the 'fuse' module.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000019
20Installation
21============
22
23See the file 'INSTALL'
24
25IMPORTANT NOTE: If you run a system with untrusted users, installing
26this program is not recommended, as it could be used to breach
27security (see the 'Security' section for explanation).
28
29How To Use
30==========
31
32FUSE is made up of three main parts:
33
34 - A kernel filesystem module (kernel/fuse.o)
35
36 - A userspace library (lib/libfuse.a)
37
38 - A mount/unmount program (util/fusermount)
39
40
41Here's how to create your very own virtual filesystem in five easy
Miklos Szerediddc862a2002-01-09 13:46:10 +000042steps (after installing FUSE):
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000043
44 1) Edit the file example/fusexmp.c to do whatever you want...
45
46 2) Build the fusexmp program
47
Miklos Szerediddc862a2002-01-09 13:46:10 +000048 3) run 'example/fusexmp /mnt/whatever -d'
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000049
50 4) ls -al /mnt/whatever
51
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000052 5) Be glad
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000053
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000054If it doesn't work out, please ask! Also see the file 'include/fuse.h' for
55detailed documentation of the library interface.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000056
Miklos Szeredie970f302004-02-25 08:39:42 +000057The fusermount program accepts a couple of additional options (see
58'fusermount -h'). You can add these options after a '--' like this:
Miklos Szerediddc862a2002-01-09 13:46:10 +000059
Miklos Szeredie970f302004-02-25 08:39:42 +000060 example/fusexmp /mnt/whatever -d -- -l
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000061
62Security
63========
64
65If you run 'make install', the fusermount program is installed
66set-user-id to root. This is done to allow normal users to mount
67their own filesystem implementations.
68
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000069There must however be some limitations, in order to prevent Bad User from
70doing nasty things. Currently those limitations are:
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000071
72 - The user can only mount on a mountpoint, for which it has write
73 permission
74
75 - The mountpoint is not a sticky directory which isn't owned by the
76 user (like /tmp usually is)
77
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000078 - No other user (including root) can access the contents of the mounted
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000079 filesystem.
80
Miklos Szeredie970f302004-02-25 08:39:42 +000081Currently the first two conditions are checked by the fusermount
82program before doing the mount. This is in fact not perfectly secure,
83since there is a window of time, after fusermount has checked the
84mountpoint and before the mount actually takes place, when the user is
85able to change the mountpoint (e.g. by changing symbolic links).
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000086
Miklos Szeredie970f302004-02-25 08:39:42 +000087The preferred method would be if the kernel would check the
88permissions. There is a patch for this for the 2.6.X kernel (where X
89>= 3) in the patch directory. If you apply this patch then the suid
90bit can be removed from the fusermount program.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000091
Miklos Szeredie970f302004-02-25 08:39:42 +000092Comments about this are appreciated.