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