Merge from Subversion r50.
[ira/wip.git] / docs / htmldocs / vfs.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Stackable VFS modules</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Advanced Configuration"
14 HREF="optional.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Hosting a Microsoft Distributed File System tree on Samba"
17 HREF="msdfs.html"><LINK
18 REL="NEXT"
19 TITLE="Securing Samba"
20 HREF="securing-samba.html"></HEAD
21 ><BODY
22 CLASS="CHAPTER"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >SAMBA Project Documentation</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="msdfs.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="securing-samba.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="CHAPTER"
73 ><H1
74 ><A
75 NAME="VFS"
76 ></A
77 >Chapter 20. Stackable VFS modules</H1
78 ><DIV
79 CLASS="SECT1"
80 ><H1
81 CLASS="SECT1"
82 ><A
83 NAME="AEN3259"
84 >20.1. Introduction and configuration</A
85 ></H1
86 ><P
87 >Since samba 3.0, samba supports stackable VFS(Virtual File System) modules.  
88 Samba passes each request to access the unix file system thru the loaded VFS modules. 
89 This chapter covers all the modules that come with the samba source and references to 
90 some external modules.</P
91 ><P
92 >You may have problems to compile these modules, as shared libraries are
93 compiled and linked in different ways on different systems.
94 They currently have been tested against GNU/linux and IRIX.</P
95 ><P
96 >To use the VFS modules, create a share similar to the one below.  The
97 important parameter is the <B
98 CLASS="COMMAND"
99 >vfs object</B
100 > parameter which must point to
101 the exact pathname of the shared library objects. For example, to log all access 
102 to files and use a recycle bin:
103
104 <PRE
105 CLASS="PROGRAMLISTING"
106 >       [audit]
107                 comment = Audited /data directory
108                 path = /data
109                 vfs object = /path/to/audit.so /path/to/recycle.so
110                 writeable = yes
111                 browseable = yes</PRE
112 ></P
113 ><P
114 >The modules are used in the order they are specified.</P
115 ><P
116 >Further documentation on writing VFS modules for Samba can be found in
117 the Samba Developers Guide.</P
118 ></DIV
119 ><DIV
120 CLASS="SECT1"
121 ><H1
122 CLASS="SECT1"
123 ><A
124 NAME="AEN3268"
125 >20.2. Included modules</A
126 ></H1
127 ><DIV
128 CLASS="SECT2"
129 ><H2
130 CLASS="SECT2"
131 ><A
132 NAME="AEN3270"
133 >20.2.1. audit</A
134 ></H2
135 ><P
136 >A simple module to audit file access to the syslog
137 facility.  The following operations are logged:
138 <P
139 ></P
140 ><TABLE
141 BORDER="0"
142 ><TBODY
143 ><TR
144 ><TD
145 >share</TD
146 ></TR
147 ><TR
148 ><TD
149 >connect/disconnect</TD
150 ></TR
151 ><TR
152 ><TD
153 >directory opens/create/remove</TD
154 ></TR
155 ><TR
156 ><TD
157 >file open/close/rename/unlink/chmod</TD
158 ></TR
159 ></TBODY
160 ></TABLE
161 ><P
162 ></P
163 ></P
164 ></DIV
165 ><DIV
166 CLASS="SECT2"
167 ><H2
168 CLASS="SECT2"
169 ><A
170 NAME="AEN3278"
171 >20.2.2. recycle</A
172 ></H2
173 ><P
174 >A recycle-bin like modules. When used any unlink call
175 will be intercepted and files moved to the recycle
176 directory instead of beeing deleted.</P
177 ><P
178 >Supported options:
179 <P
180 ></P
181 ><DIV
182 CLASS="VARIABLELIST"
183 ><DL
184 ><DT
185 >vfs_recycle_bin:repository</DT
186 ><DD
187 ><P
188 >FIXME</P
189 ></DD
190 ><DT
191 >vfs_recycle_bin:keeptree</DT
192 ><DD
193 ><P
194 >FIXME</P
195 ></DD
196 ><DT
197 >vfs_recycle_bin:versions</DT
198 ><DD
199 ><P
200 >FIXME</P
201 ></DD
202 ><DT
203 >vfs_recycle_bin:touch</DT
204 ><DD
205 ><P
206 >FIXME</P
207 ></DD
208 ><DT
209 >vfs_recycle_bin:maxsize</DT
210 ><DD
211 ><P
212 >FIXME</P
213 ></DD
214 ><DT
215 >vfs_recycle_bin:exclude</DT
216 ><DD
217 ><P
218 >FIXME</P
219 ></DD
220 ><DT
221 >vfs_recycle_bin:exclude_dir</DT
222 ><DD
223 ><P
224 >FIXME</P
225 ></DD
226 ><DT
227 >vfs_recycle_bin:noversions</DT
228 ><DD
229 ><P
230 >FIXME</P
231 ></DD
232 ></DL
233 ></DIV
234 ></P
235 ></DIV
236 ><DIV
237 CLASS="SECT2"
238 ><H2
239 CLASS="SECT2"
240 ><A
241 NAME="AEN3315"
242 >20.2.3. netatalk</A
243 ></H2
244 ><P
245 >A netatalk module, that will ease co-existence of samba and
246 netatalk file sharing services.</P
247 ><P
248 >Advantages compared to the old netatalk module:
249 <P
250 ></P
251 ><TABLE
252 BORDER="0"
253 ><TBODY
254 ><TR
255 ><TD
256 >it doesn't care about creating of .AppleDouble forks, just keeps ones in sync</TD
257 ></TR
258 ><TR
259 ><TD
260 >if share in smb.conf doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</TD
261 ></TR
262 ></TBODY
263 ></TABLE
264 ><P
265 ></P
266 ></P
267 ></DIV
268 ></DIV
269 ><DIV
270 CLASS="SECT1"
271 ><H1
272 CLASS="SECT1"
273 ><A
274 NAME="AEN3322"
275 >20.3. VFS modules available elsewhere</A
276 ></H1
277 ><P
278 >This section contains a listing of various other VFS modules that 
279 have been posted but don't currently reside in the Samba CVS 
280 tree for one reason ot another (e.g. it is easy for the maintainer 
281 to have his or her own CVS tree).</P
282 ><P
283 >No statemets about the stability or functionality any module
284 should be implied due to its presence here.</P
285 ><DIV
286 CLASS="SECT2"
287 ><H2
288 CLASS="SECT2"
289 ><A
290 NAME="AEN3326"
291 >20.3.1. DatabaseFS</A
292 ></H2
293 ><P
294 >URL: <A
295 HREF="http://www.css.tayloru.edu/~elorimer/databasefs/index.php"
296 TARGET="_top"
297 >http://www.css.tayloru.edu/~elorimer/databasefs/index.php</A
298 ></P
299 ><P
300 >By <A
301 HREF="mailto:elorimer@css.tayloru.edu"
302 TARGET="_top"
303 >Eric Lorimer</A
304 >.</P
305 ><P
306 >I have created a VFS module which implements a fairly complete read-only
307 filesystem.  It presents information from a database as a filesystem in
308 a modular and generic way to allow different databases to be used
309 (originally designed for organizing MP3s under directories such as
310 "Artists," "Song Keywords," etc... I have since applied it to a student
311 roster database very easily).  The directory structure is stored in the
312 database itself and the module makes no assumptions about the database
313 structure beyond the table it requires to run.</P
314 ><P
315 >Any feedback would be appreciated: comments, suggestions, patches,
316 etc...  If nothing else, hopefully it might prove useful for someone
317 else who wishes to create a virtual filesystem.</P
318 ></DIV
319 ><DIV
320 CLASS="SECT2"
321 ><H2
322 CLASS="SECT2"
323 ><A
324 NAME="AEN3334"
325 >20.3.2. vscan</A
326 ></H2
327 ><P
328 >URL: <A
329 HREF="http://www.openantivirus.org/"
330 TARGET="_top"
331 >http://www.openantivirus.org/</A
332 ></P
333 ><P
334 >samba-vscan is a proof-of-concept module for Samba, which
335 uses the VFS (virtual file system) features of Samba 2.2.x/3.0
336 alphaX. Of couse, Samba has to be compiled with VFS support. 
337 samba-vscan supports various virus scanners and is maintained 
338 by Rainer Link.</P
339 ></DIV
340 ></DIV
341 ></DIV
342 ><DIV
343 CLASS="NAVFOOTER"
344 ><HR
345 ALIGN="LEFT"
346 WIDTH="100%"><TABLE
347 SUMMARY="Footer navigation table"
348 WIDTH="100%"
349 BORDER="0"
350 CELLPADDING="0"
351 CELLSPACING="0"
352 ><TR
353 ><TD
354 WIDTH="33%"
355 ALIGN="left"
356 VALIGN="top"
357 ><A
358 HREF="msdfs.html"
359 ACCESSKEY="P"
360 >Prev</A
361 ></TD
362 ><TD
363 WIDTH="34%"
364 ALIGN="center"
365 VALIGN="top"
366 ><A
367 HREF="samba-howto-collection.html"
368 ACCESSKEY="H"
369 >Home</A
370 ></TD
371 ><TD
372 WIDTH="33%"
373 ALIGN="right"
374 VALIGN="top"
375 ><A
376 HREF="securing-samba.html"
377 ACCESSKEY="N"
378 >Next</A
379 ></TD
380 ></TR
381 ><TR
382 ><TD
383 WIDTH="33%"
384 ALIGN="left"
385 VALIGN="top"
386 >Hosting a Microsoft Distributed File System tree on Samba</TD
387 ><TD
388 WIDTH="34%"
389 ALIGN="center"
390 VALIGN="top"
391 ><A
392 HREF="optional.html"
393 ACCESSKEY="U"
394 >Up</A
395 ></TD
396 ><TD
397 WIDTH="33%"
398 ALIGN="right"
399 VALIGN="top"
400 >Securing Samba</TD
401 ></TR
402 ></TABLE
403 ></DIV
404 ></BODY
405 ></HTML
406 >