Regenerate docs
[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="PAM Configuration for Centrally Managed Authentication"
17 HREF="pam.html"><LINK
18 REL="NEXT"
19 TITLE="Hosting a Microsoft Distributed File System tree on Samba"
20 HREF="msdfs.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="pam.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="msdfs.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="AEN3531"
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="AEN3540"
125 >20.2. Included modules</A
126 ></H1
127 ><DIV
128 CLASS="SECT2"
129 ><H2
130 CLASS="SECT2"
131 ><A
132 NAME="AEN3542"
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="AEN3550"
171 >20.2.2. extd_audit</A
172 ></H2
173 ><P
174 >This module is identical with the <SPAN
175 CLASS="emphasis"
176 ><I
177 CLASS="EMPHASIS"
178 >audit</I
179 ></SPAN
180 > module above except
181 that it sends audit logs to both syslog as well as the smbd log file/s. The 
182 loglevel for this module is set in the smb.conf file. At loglevel = 0, only file
183 and directory deletions and directory and file creations are logged. At loglevel = 1
184 file opens are renames and permission changes are logged , while at loglevel = 2 file
185 open and close calls are logged also.</P
186 ></DIV
187 ><DIV
188 CLASS="SECT2"
189 ><H2
190 CLASS="SECT2"
191 ><A
192 NAME="AEN3554"
193 >20.2.3. recycle</A
194 ></H2
195 ><P
196 >A recycle-bin like modules. When used any unlink call
197 will be intercepted and files moved to the recycle
198 directory instead of beeing deleted.</P
199 ><P
200 >Supported options:
201 <P
202 ></P
203 ><DIV
204 CLASS="VARIABLELIST"
205 ><DL
206 ><DT
207 >vfs_recycle_bin:repository</DT
208 ><DD
209 ><P
210 >FIXME</P
211 ></DD
212 ><DT
213 >vfs_recycle_bin:keeptree</DT
214 ><DD
215 ><P
216 >FIXME</P
217 ></DD
218 ><DT
219 >vfs_recycle_bin:versions</DT
220 ><DD
221 ><P
222 >FIXME</P
223 ></DD
224 ><DT
225 >vfs_recycle_bin:touch</DT
226 ><DD
227 ><P
228 >FIXME</P
229 ></DD
230 ><DT
231 >vfs_recycle_bin:maxsize</DT
232 ><DD
233 ><P
234 >FIXME</P
235 ></DD
236 ><DT
237 >vfs_recycle_bin:exclude</DT
238 ><DD
239 ><P
240 >FIXME</P
241 ></DD
242 ><DT
243 >vfs_recycle_bin:exclude_dir</DT
244 ><DD
245 ><P
246 >FIXME</P
247 ></DD
248 ><DT
249 >vfs_recycle_bin:noversions</DT
250 ><DD
251 ><P
252 >FIXME</P
253 ></DD
254 ></DL
255 ></DIV
256 ></P
257 ></DIV
258 ><DIV
259 CLASS="SECT2"
260 ><H2
261 CLASS="SECT2"
262 ><A
263 NAME="AEN3591"
264 >20.2.4. netatalk</A
265 ></H2
266 ><P
267 >A netatalk module, that will ease co-existence of samba and
268 netatalk file sharing services.</P
269 ><P
270 >Advantages compared to the old netatalk module:
271 <P
272 ></P
273 ><TABLE
274 BORDER="0"
275 ><TBODY
276 ><TR
277 ><TD
278 >it doesn't care about creating of .AppleDouble forks, just keeps ones in sync</TD
279 ></TR
280 ><TR
281 ><TD
282 >if share in smb.conf doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</TD
283 ></TR
284 ></TBODY
285 ></TABLE
286 ><P
287 ></P
288 ></P
289 ></DIV
290 ></DIV
291 ><DIV
292 CLASS="SECT1"
293 ><H1
294 CLASS="SECT1"
295 ><A
296 NAME="AEN3598"
297 >20.3. VFS modules available elsewhere</A
298 ></H1
299 ><P
300 >This section contains a listing of various other VFS modules that 
301 have been posted but don't currently reside in the Samba CVS 
302 tree for one reason ot another (e.g. it is easy for the maintainer 
303 to have his or her own CVS tree).</P
304 ><P
305 >No statemets about the stability or functionality any module
306 should be implied due to its presence here.</P
307 ><DIV
308 CLASS="SECT2"
309 ><H2
310 CLASS="SECT2"
311 ><A
312 NAME="AEN3602"
313 >20.3.1. DatabaseFS</A
314 ></H2
315 ><P
316 >URL: <A
317 HREF="http://www.css.tayloru.edu/~elorimer/databasefs/index.php"
318 TARGET="_top"
319 >http://www.css.tayloru.edu/~elorimer/databasefs/index.php</A
320 ></P
321 ><P
322 >By <A
323 HREF="mailto:elorimer@css.tayloru.edu"
324 TARGET="_top"
325 >Eric Lorimer</A
326 >.</P
327 ><P
328 >I have created a VFS module which implements a fairly complete read-only
329 filesystem.  It presents information from a database as a filesystem in
330 a modular and generic way to allow different databases to be used
331 (originally designed for organizing MP3s under directories such as
332 "Artists," "Song Keywords," etc... I have since applied it to a student
333 roster database very easily).  The directory structure is stored in the
334 database itself and the module makes no assumptions about the database
335 structure beyond the table it requires to run.</P
336 ><P
337 >Any feedback would be appreciated: comments, suggestions, patches,
338 etc...  If nothing else, hopefully it might prove useful for someone
339 else who wishes to create a virtual filesystem.</P
340 ></DIV
341 ><DIV
342 CLASS="SECT2"
343 ><H2
344 CLASS="SECT2"
345 ><A
346 NAME="AEN3610"
347 >20.3.2. vscan</A
348 ></H2
349 ><P
350 >URL: <A
351 HREF="http://www.openantivirus.org/"
352 TARGET="_top"
353 >http://www.openantivirus.org/</A
354 ></P
355 ><P
356 >samba-vscan is a proof-of-concept module for Samba, which
357 uses the VFS (virtual file system) features of Samba 2.2.x/3.0
358 alphaX. Of couse, Samba has to be compiled with VFS support. 
359 samba-vscan supports various virus scanners and is maintained 
360 by Rainer Link.</P
361 ></DIV
362 ></DIV
363 ></DIV
364 ><DIV
365 CLASS="NAVFOOTER"
366 ><HR
367 ALIGN="LEFT"
368 WIDTH="100%"><TABLE
369 SUMMARY="Footer navigation table"
370 WIDTH="100%"
371 BORDER="0"
372 CELLPADDING="0"
373 CELLSPACING="0"
374 ><TR
375 ><TD
376 WIDTH="33%"
377 ALIGN="left"
378 VALIGN="top"
379 ><A
380 HREF="pam.html"
381 ACCESSKEY="P"
382 >Prev</A
383 ></TD
384 ><TD
385 WIDTH="34%"
386 ALIGN="center"
387 VALIGN="top"
388 ><A
389 HREF="samba-howto-collection.html"
390 ACCESSKEY="H"
391 >Home</A
392 ></TD
393 ><TD
394 WIDTH="33%"
395 ALIGN="right"
396 VALIGN="top"
397 ><A
398 HREF="msdfs.html"
399 ACCESSKEY="N"
400 >Next</A
401 ></TD
402 ></TR
403 ><TR
404 ><TD
405 WIDTH="33%"
406 ALIGN="left"
407 VALIGN="top"
408 >PAM Configuration for Centrally Managed Authentication</TD
409 ><TD
410 WIDTH="34%"
411 ALIGN="center"
412 VALIGN="top"
413 ><A
414 HREF="optional.html"
415 ACCESSKEY="U"
416 >Up</A
417 ></TD
418 ><TD
419 WIDTH="33%"
420 ALIGN="right"
421 VALIGN="top"
422 >Hosting a Microsoft Distributed File System tree on Samba</TD
423 ></TR
424 ></TABLE
425 ></DIV
426 ></BODY
427 ></HTML
428 >