summaryrefslogtreecommitdiff
path: root/docs/htmldocs/vfs.html
blob: fb0554e10cd615698c541334d45b3f0dc889d479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Stackable VFS modules</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
REL="HOME"
TITLE="SAMBA Project Documentation"
HREF="samba-howto-collection.html"><LINK
REL="UP"
TITLE="Optional configuration"
HREF="optional.html"><LINK
REL="PREVIOUS"
TITLE="Passdb XML plugin"
HREF="pdb-xml.html"><LINK
REL="NEXT"
TITLE="Storing Samba's User/Machine Account information in an LDAP Directory"
HREF="samba-ldap-howto.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>SAMBA Project Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="pdb-xml.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="samba-ldap-howto.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="VFS"
></A
>Chapter 19. Stackable VFS modules</H1
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN2651"
></A
>19.1. Introduction and configuration</H1
><P
>Since samba 3.0, samba supports stackable VFS(Virtual File System) modules. 
Samba passes each request to access the unix file system thru the loaded VFS modules. 
This chapter covers all the modules that come with the samba source and references to 
some external modules.</P
><P
>You may have problems to compile these modules, as shared libraries are
compiled and linked in different ways on different systems.
I currently tested them against GNU/linux and IRIX.</P
><P
>To use the VFS modules, create a share similar to the one below.  The
important parameter is the <B
CLASS="COMMAND"
>vfs object</B
> parameter which must point to
the exact pathname of the shared library object. For example, to use audit.so:

<PRE
CLASS="PROGRAMLISTING"
>       [audit]
                comment = Audited /data directory
                path = /data
                vfs object = /path/to/audit.so
                writeable = yes
                browseable = yes</PRE
></P
><P
>Further documentation on writing VFS modules for Samba can be found in
docs directory of the Samba source distribution.</P
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN2659"
></A
>19.2. Included modules</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2661"
></A
>19.2.1. audit</H2
><P
>A simple module to audit file access to the syslog
facility.  The following operations are logged:
<P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>share</TD
></TR
><TR
><TD
>connect/disconnect</TD
></TR
><TR
><TD
>directory opens/create/remove</TD
></TR
><TR
><TD
>file open/close/rename/unlink/chmod</TD
></TR
></TBODY
></TABLE
><P
></P
></P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2669"
></A
>19.2.2. recycle</H2
><P
>A recycle-bin like modules. When used any unlink call
will be intercepted and files moved to the recycle
directory instead of beeing deleted.</P
><P
>Supported options:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>vfs_recycle_bin:repository</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:keeptree</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:versions</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:touch</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:maxsize</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:exclude</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:exclude_dir</DT
><DD
><P
>FIXME</P
></DD
><DT
>vfs_recycle_bin:noversions</DT
><DD
><P
>FIXME</P
></DD
></DL
></DIV
></P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2706"
></A
>19.2.3. netatalk</H2
><P
>A netatalk module, that will ease co-existence of samba and
netatalk file sharing services.</P
><P
>Advantages compared to the old netatalk module:
<P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>it doesn't care about creating of .AppleDouble forks, just keeps ones in sync</TD
></TR
><TR
><TD
>if share in smb.conf doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</TD
></TR
></TBODY
></TABLE
><P
></P
></P
></DIV
></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN2713"
></A
>19.3. VFS modules available elsewhere</H1
><P
>This section contains a listing of various other VFS modules that 
have been posted but don't currently reside in the Samba CVS 
tree for one reason ot another (e.g. it is easy for the maintainer 
to have his or her own CVS tree).</P
><P
>No statemets about the stability or functionality any module
should be implied due to its presence here.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2717"
></A
>19.3.1. DatabaseFS</H2
><P
>URL: <A
HREF="http://www.css.tayloru.edu/~elorimer/databasefs/index.php"
TARGET="_top"
>http://www.css.tayloru.edu/~elorimer/databasefs/index.php</A
></P
><P
>By <A
HREF="mailto:elorimer@css.tayloru.edu"
TARGET="_top"
>Eric Lorimer</A
>.</P
><P
>I have created a VFS module which implements a fairly complete read-only
filesystem.  It presents information from a database as a filesystem in
a modular and generic way to allow different databases to be used
(originally designed for organizing MP3s under directories such as
"Artists," "Song Keywords," etc... I have since applied it to a student
roster database very easily).  The directory structure is stored in the
database itself and the module makes no assumptions about the database
structure beyond the table it requires to run.</P
><P
>Any feedback would be appreciated: comments, suggestions, patches,
etc...  If nothing else, hopefully it might prove useful for someone
else who wishes to create a virtual filesystem.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN2725"
></A
>19.3.2. vscan</H2
><P
>URL: <A
HREF="http://www.openantivirus.org/"
TARGET="_top"
>http://www.openantivirus.org/</A
></P
><P
>samba-vscan is a proof-of-concept module for Samba, which
uses the VFS (virtual file system) features of Samba 2.2.x/3.0
alphaX. Of couse, Samba has to be compiled with VFS support. 
samba-vscan supports various virus scanners and is maintained 
by Rainer Link.</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="pdb-xml.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="samba-howto-collection.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="samba-ldap-howto.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Passdb XML plugin</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="optional.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Storing Samba's User/Machine Account information in an LDAP Directory</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>