5 <author><firstname>Tim</firstname><surname>Potter</surname></author>
6 <author><firstname>Simo</firstname><surname>Sorce</surname><contrib>original vfs_skel README</contrib></author>
7 <author><firstname>Alexander</firstname><surname>Bokovoy</surname><contrib>original vfs_netatalk docs</contrib></author>
8 <author><firstname>Stefan</firstname><surname>Metzmacher</surname><contrib>Update for multiple modules</contrib></author>
10 <title>Stackable VFS modules</title>
13 <title>Features and Benefits</title>
16 Since Samba-3, there is support for stackable VFS(Virtual File System) modules.
17 Samba passes each request to access the unix file system thru the loaded VFS modules.
18 This chapter covers all the modules that come with the samba source and references to
19 some external modules.
26 <title>Discussion</title>
29 If not supplied with your platform distribution binary Samba package you may have problems
30 to compile these modules, as shared libraries are compiled and linked in different ways
31 on different systems. They currently have been tested against GNU/Linux and IRIX.
35 To use the VFS modules, create a share similar to the one below. The
36 important parameter is the <command>vfs objects</command> parameter where
37 you can list one or more VFS modules by name. For example, to log all access
38 to files and put deleted files in a recycle bin:
42 comment = Audited /data directory
44 vfs objects = audit recycle
51 The modules are used in the order in which they are specified.
55 Samba will attempt to load modules from the <emphasis>lib</emphasis>
56 directory in the root directory of the samba installation (usually
57 <filename>/usr/lib/samba</filename> or <filename>/usr/local/samba/lib
62 Some modules can be used twice for the same share.
63 This can be done using a configuration similar to the one below.
71 vfs objects = example:example1 example example:test
72 example1: parameter = 1
73 example: parameter = 5
81 <title>Included modules</title>
87 A simple module to audit file access to the syslog
88 facility. The following operations are logged:
90 <member>share</member>
91 <member>connect/disconnect</member>
92 <member>directory opens/create/remove</member>
93 <member>file open/close/rename/unlink/chmod</member>
100 <title>extd_audit</title>
103 This module is identical with the <emphasis>audit</emphasis> module above except
104 that it sends audit logs to both syslog as well as the smbd log file/s. The
105 loglevel for this module is set in the smb.conf file.
109 The logging information that will be written to the smbd log file is controlled by
110 the <parameter>log level</parameter> parameter in <filename>smb.conf</filename>. The
111 following information will be recorded:
114 <table frame="all"><title>Extended Auditing Log Information</title>
115 <tgroup cols="2" align="center">
117 <row><entry align="center">Log Level</entry><entry>Log Details - File and Directory Operations</entry></row>
120 <row><entry align="center">0</entry><entry align="left">Creation / Deletion</entry></row>
121 <row><entry align="center">1</entry><entry align="left">Create / Delete / Rename / Permission Changes</entry></row>
122 <row><entry align="center">2</entry><entry align="left">Create / Delete / Rename / Perm Change / Open / Close</entry></row>
130 <title>fake_perms</title>
133 This module was created to allow Roaming Profile files and directories to be set (on the Samba server
134 under Unix) as read only. This module will if installed on the Profiles share will report to the client
135 that the Profile files and directories are writable. This satisfies the client even though the files
136 will never be overwritten as the client logs out or shuts down.
142 <title>recycle</title>
145 A recycle-bin like module. When used any unlink call
146 will be intercepted and files moved to the recycle
147 directory instead of being deleted.
150 <para>Supported options:
153 <term>recycle:repository</term>
154 <listitem><para>FIXME</para></listitem>
158 <term>recycle:keeptree</term>
159 <listitem><para>FIXME</para></listitem>
163 <term>recycle:versions</term>
164 <listitem><para>FIXME</para></listitem>
168 <term>recycle:touch</term>
169 <listitem><para>FIXME</para></listitem>
173 <term>recycle:maxsize</term>
174 <listitem><para>FIXME</para></listitem>
178 <term>recycle:exclude</term>
179 <listitem><para>FIXME</para></listitem>
183 <term>recycle:exclude_dir</term>
184 <listitem><para>FIXME</para></listitem>
188 <term>recycle:noversions</term>
189 <listitem><para>FIXME</para></listitem>
197 <title>netatalk</title>
200 A netatalk module, that will ease co-existence of samba and
201 netatalk file sharing services.
204 <para>Advantages compared to the old netatalk module:
206 <member>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</member>
207 <member>if a share in &smb.conf; doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</member>
216 <title>VFS modules available elsewhere</title>
219 This section contains a listing of various other VFS modules that
220 have been posted but don't currently reside in the Samba CVS
221 tree for one reason or another (e.g. it is easy for the maintainer
222 to have his or her own CVS tree).
226 No statements about the stability or functionality of any module
227 should be implied due to its presence here.
231 <title>DatabaseFS</title>
234 URL: <ulink url="http://www.css.tayloru.edu/~elorimer/databasefs/index.php">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</ulink>
237 <para>By <ulink url="mailto:elorimer@css.tayloru.edu">Eric Lorimer</ulink>.</para>
240 I have created a VFS module which implements a fairly complete read-only
241 filesystem. It presents information from a database as a filesystem in
242 a modular and generic way to allow different databases to be used
243 (originally designed for organizing MP3s under directories such as
244 "Artists," "Song Keywords," etc... I have since applied it to a student
245 roster database very easily). The directory structure is stored in the
246 database itself and the module makes no assumptions about the database
247 structure beyond the table it requires to run.
251 Any feedback would be appreciated: comments, suggestions, patches,
252 etc... If nothing else, hopefully it might prove useful for someone
253 else who wishes to create a virtual filesystem.
261 <para>URL: <ulink url="http://www.openantivirus.org/">http://www.openantivirus.org/</ulink></para>
264 samba-vscan is a proof-of-concept module for Samba, which
265 uses the VFS (virtual file system) features of Samba 2.2.x/3.0
266 alphaX. Of couse, Samba has to be compiled with VFS support.
267 samba-vscan supports various virus scanners and is maintained
275 <title>Common Errors</title>
278 There must be some gotchas we should record here! Jelmer???