blob: 14eed403f9404425219406b42e1ea1e887aaf1b9 [file] [log] [blame]
Miklos Szeredi8cffdb92001-11-09 14:49:18 +00001General Information
2===================
3
Miklos Szeredi539488e2005-02-02 10:17:38 +00004FUSE (Filesystem in Userspace) is a simple interface for userspace
Miklos Szeredi8cffdb92001-11-09 14:49:18 +00005programs 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
Miklos Szeredia2c5e562004-10-19 22:01:21 +000011 http://sourceforge.net/projects/fuse
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000012
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
Miklos Szeredia2c5e562004-10-19 22:01:21 +000016 :pserver:anonymous@cvs.sourceforge.net:/cvsroot/fuse
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000017
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000018and checking out the 'fuse' module.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000019
20Installation
21============
22
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000023./configure
24make
25make install
Miklos Szeredi539488e2005-02-02 10:17:38 +000026modprobe fuse
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000027
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000028Also see the file 'INSTALL'
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000029
30How To Use
31==========
32
33FUSE is made up of three main parts:
34
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000035 - A kernel filesystem module
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000036
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000037 - A userspace library
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000038
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000039 - A mount/unmount program
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000040
41
42Here's how to create your very own virtual filesystem in five easy
Miklos Szerediddc862a2002-01-09 13:46:10 +000043steps (after installing FUSE):
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000044
45 1) Edit the file example/fusexmp.c to do whatever you want...
46
47 2) Build the fusexmp program
48
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000049 3) run 'example/fusexmp /mnt/fuse -d'
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000050
Miklos Szeredi94ed76a2004-07-26 19:38:45 +000051 4) ls -al /mnt/fuse
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000052
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000053 5) Be glad
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000054
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000055If it doesn't work out, please ask! Also see the file 'include/fuse.h' for
56detailed documentation of the library interface.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000057
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000058Security
59========
60
61If you run 'make install', the fusermount program is installed
62set-user-id to root. This is done to allow normal users to mount
Miklos Szeredie5183742005-02-02 11:14:04 +000063their own filesystem implementations.
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000064
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000065There must however be some limitations, in order to prevent Bad User from
66doing nasty things. Currently those limitations are:
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000067
68 - The user can only mount on a mountpoint, for which it has write
69 permission
70
71 - The mountpoint is not a sticky directory which isn't owned by the
72 user (like /tmp usually is)
73
Miklos Szeredi0a7077f2001-11-11 18:20:17 +000074 - No other user (including root) can access the contents of the mounted
Miklos Szeredi8cffdb92001-11-09 14:49:18 +000075 filesystem.
Miklos Szeredi539488e2005-02-02 10:17:38 +000076
77Configuration
78=============
79
80Some options regarding mount policy can be set in the file
81'/etc/fuse.conf'
82
83Currently these options are:
84
85mount_max = NNN
86
87 Set the maximum number of FUSE mounts allowed to non-root users.
88 The default is 1000.
89
90user_allow_other
91
92 Allow non-root users to specify the 'allow_other' or 'allow_root'
93 mount options.
94
95
96Mount options
97=============
98
99These are FUSE specific mount options that can be specified for all
100filesystems:
101
102default_permissions
103
104 By default FUSE doesn't check file access permissions, the
105 filesystem is free to implement it's access policy or leave it to
106 the underlying file access mechanism (e.g. in case of network
107 filesystems). This option enables permission checking, restricting
108 access based on file mode. This is option is usually useful
109 together with the 'allow_other' mount option.
110
111allow_other
112
113 This option overrides the security measure restricting file access
114 to the user mounting the filesystem. This option is by default only
115 allowed to root, but this restriction can be removed with a
116 configuration option described in the previous section.
117
118allow_root
119
120 This option is similar to 'allow_other' but file access is limited
121 to the user mounting the filesystem and root.
122
123kernel_cache
124
125 This option disables flushing the cache of the file contents on
126 every open(). This should only be enabled on filesystems, where the
127 file data is never changed externally (not through the mounted FUSE
128 filesystem). Thus it is not suitable for network filesystems and
129 other "intermediate" filesystems.
130
131 NOTE: if this option is not specified (and neither 'direct_io') data
132 is still cached after the open(), so a read() system call will not
133 always initiate a read operation.
134
135large_read
136
137 Issue large read requests. This can improve performance for some
138 filesystems, but can also degrade performance. This option is only
139 useful on 2.4.X kernels, as on 2.6 kernels requests size is
140 automatically determined for optimum performance.
141
142direct_io
143
144 This option disables the use of page cache (file content cache) in
145 the kernel for this filesystem. This has several affects:
146
147 - Each read() or write() system call will initiate one or more
148 read or write operations, data will not be cached in the
149 kernel.
150
151 - The return value of the read() and write() system calls will
152 correspond to the return values of the read and write
153 operations. This is useful for example if the file size is not
154 known in advance (before reading it).
155
156max_read=N
157
158 With this option the maximum size of read operations can be set.
159 The default is infinite. Note that the size of read requests is
160 limited anyway to 32 pages (which is 128kbyte on i386).
161
162hard_remove
163
164 The default behavior is that if an open file is deleted, the file is
165 renamed to a hidden file (.fuse_hiddenXXX), and only removed when
166 the file is finally released. This relieves the filesystem
167 implementation of having to deal with this problem. This option
168 disables the hiding behavior, and files are removed immediately in
169 an unlink operation (or in a rename operation which overwrites an
170 existing file).
171
172debug
173
174 Turns on debug information printing by the library.
175
176fsname=NAME
177
178 Sets the filesystem name. The default is the program name.
Miklos Szeredie5183742005-02-02 11:14:04 +0000179