ading new files from 3.0
[jra/samba/.git] / docs / htmldocs / VFS.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 20. Stackable VFS modules</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="CUPS-printing.html" title="Chapter 19. CUPS Printing Support in Samba 3.0"><link rel="next" href="winbind.html" title="Chapter 21. Integrated Logon Support using Winbind"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 20. Stackable VFS modules</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="winbind.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="VFS"></a>Chapter 20. Stackable VFS modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="surname">Potter</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Simo</span> <span class="surname">Sorce</span></h3><span class="contrib">original vfs_skel README</span></div></div><div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Bokovoy</span></h3><span class="contrib">original vfs_netatalk docs</span></div></div><div><div class="author"><h3 class="author"><span class="firstname">Stefan</span> <span class="surname">Metzmacher</span></h3><span class="contrib">Update for multiple modules</span></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="VFS.html#id2978211">Features and Benefits</a></dt><dt><a href="VFS.html#id2978229">Discussion</a></dt><dt><a href="VFS.html#id2978320">Included modules</a></dt><dd><dl><dt><a href="VFS.html#id2978327">audit</a></dt><dt><a href="VFS.html#id2978365">extd_audit</a></dt><dt><a href="VFS.html#id2978489">fake_perms</a></dt><dt><a href="VFS.html#id2978508">recycle</a></dt><dt><a href="VFS.html#id2978645">netatalk</a></dt></dl></dd><dt><a href="VFS.html#id2978690">VFS modules available elsewhere</a></dt><dd><dl><dt><a href="VFS.html#id2978712">DatabaseFS</a></dt><dt><a href="VFS.html#id2978768">vscan</a></dt></dl></dd><dt><a href="VFS.html#id2978797">Common Errors</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2978211"></a>Features and Benefits</h2></div></div><div></div></div><p>
2 Since Samba-3, there is support for stackable VFS(Virtual File System) modules.  
3 Samba passes each request to access the unix file system thru the loaded VFS modules. 
4 This chapter covers all the modules that come with the samba source and references to 
5 some external modules.
6 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2978229"></a>Discussion</h2></div></div><div></div></div><p>
7 If not supplied with your platform distribution binary Samba package you may have problems
8 to compile these modules, as shared libraries are compiled and linked in different ways
9 on different systems.  They currently have been tested against GNU/Linux and IRIX.
10 </p><p>
11 To use the VFS modules, create a share similar to the one below.  The
12 important parameter is the <b class="command">vfs objects</b> parameter where
13 you can list one or more VFS modules by name. For example, to log all access 
14 to files and put deleted files in a recycle bin:
15
16 </p><pre class="programlisting">
17 [audit]
18         comment = Audited /data directory
19         path = /data
20         vfs objects = audit recycle
21         writeable = yes
22         browseable = yes
23 </pre><p>
24 </p><p>
25 The modules are used in the order in which they are specified.
26 </p><p>
27 Samba will attempt to load modules from the <span class="emphasis"><em>lib</em></span>
28 directory in the root directory of the samba installation (usually 
29 <tt class="filename">/usr/lib/samba/vfs</tt> or <tt class="filename">/usr/local/samba/lib/vfs
30 </tt>).
31 </p><p>
32 Some modules can be used twice for the same share.
33 This can be done using a configuration similar to the one below.
34
35 </p><pre class="programlisting">
36 [test]
37         comment = VFS TEST
38         path = /data
39         writeable = yes
40         browseable = yes
41         vfs objects = example:example1 example example:test
42                 example1: parameter = 1
43                 example:  parameter = 5
44                 test:     parameter = 7
45 </pre><p>
46 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2978320"></a>Included modules</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978327"></a>audit</h3></div></div><div></div></div><p>
47                 A simple module to audit file access to the syslog
48                 facility.  The following operations are logged:
49                 </p><table class="simplelist" border="0" summary="Simple list"><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></table><p>
50                 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978365"></a>extd_audit</h3></div></div><div></div></div><p>
51                 This module is identical with the <span class="emphasis"><em>audit</em></span> module above except
52                 that it sends audit logs to both syslog as well as the smbd log file/s. The 
53                 loglevel for this module is set in the smb.conf file. 
54                 </p><p>
55                 The logging information that will be written to the smbd log file is controlled by
56                 the <i class="parameter"><tt>log level</tt></i> parameter in <tt class="filename">smb.conf</tt>. The
57                 following information will be recorded:
58                 </p><div class="table"><a name="id2978406"></a><p class="title"><b>Table 20.1. Extended Auditing Log Information</b></p><table summary="Extended Auditing Log Information" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Log Level</th><th align="center">Log Details - File and Directory Operations</th></tr></thead><tbody><tr><td align="center">0</td><td align="left">Creation / Deletion</td></tr><tr><td align="center">1</td><td align="left">Create / Delete / Rename / Permission Changes</td></tr><tr><td align="center">2</td><td align="left">Create / Delete / Rename / Perm Change / Open / Close</td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978489"></a>fake_perms</h3></div></div><div></div></div><p>
59                 This module was created to allow Roaming Profile files and directories to be set (on the Samba server
60                 under Unix) as read only. This module will if installed on the Profiles share will report to the client
61                 that the Profile files and directories are writable. This satisfies the client even though the files
62                 will never be overwritten as the client logs out or shuts down.
63                 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978508"></a>recycle</h3></div></div><div></div></div><p>
64                 A recycle-bin like module. When used any unlink call
65                 will be intercepted and files moved to the recycle
66                 directory instead of being deleted.
67                 </p><p>Supported options:
68                 </p><div class="variablelist"><dl><dt><span class="term">recycle:repository</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:keeptree</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:versions</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:touch</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:maxsize</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:exclude</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:exclude_dir</span></dt><dd><p>FIXME</p></dd><dt><span class="term">recycle:noversions</span></dt><dd><p>FIXME</p></dd></dl></div><p>
69                 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978645"></a>netatalk</h3></div></div><div></div></div><p>
70                 A netatalk module, that will ease co-existence of samba and
71                 netatalk file sharing services.
72                 </p><p>Advantages compared to the old netatalk module:
73                 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>it doesn't care about creating of .AppleDouble forks, just keeps them in sync</td></tr><tr><td>if a share in <tt class="filename">smb.conf</tt> doesn't contain .AppleDouble item in hide or veto list, it will be added automatically</td></tr></table><p>
74                 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2978690"></a>VFS modules available elsewhere</h2></div></div><div></div></div><p>
75 This section contains a listing of various other VFS modules that 
76 have been posted but don't currently reside in the Samba CVS 
77 tree for one reason or another (e.g. it is easy for the maintainer 
78 to have his or her own CVS tree).
79 </p><p>
80 No statements about the stability or functionality of any module
81 should be implied due to its presence here.
82 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978712"></a>DatabaseFS</h3></div></div><div></div></div><p>
83                 URL: <a href="http://www.css.tayloru.edu/~elorimer/databasefs/index.php" target="_top">http://www.css.tayloru.edu/~elorimer/databasefs/index.php</a>
84                 </p><p>By <a href="mailto:elorimer@css.tayloru.edu" target="_top">Eric Lorimer</a>.</p><p>
85                 I have created a VFS module which implements a fairly complete read-only
86                 filesystem.  It presents information from a database as a filesystem in
87                 a modular and generic way to allow different databases to be used
88                 (originally designed for organizing MP3s under directories such as
89                 &quot;Artists,&quot; &quot;Song Keywords,&quot; etc... I have since applied it to a student
90                 roster database very easily).  The directory structure is stored in the
91                 database itself and the module makes no assumptions about the database
92                 structure beyond the table it requires to run.
93                 </p><p>
94                 Any feedback would be appreciated: comments, suggestions, patches,
95                 etc...  If nothing else, hopefully it might prove useful for someone
96                 else who wishes to create a virtual filesystem.
97                 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2978768"></a>vscan</h3></div></div><div></div></div><p>URL: <a href="http://www.openantivirus.org/" target="_top">http://www.openantivirus.org/</a></p><p>
98                 samba-vscan is a proof-of-concept module for Samba, which
99                 uses the VFS (virtual file system) features of Samba 2.2.x/3.0
100                 alphaX. Of course, Samba has to be compiled with VFS support. 
101                 samba-vscan supports various virus scanners and is maintained 
102                 by Rainer Link.
103                 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2978797"></a>Common Errors</h2></div></div><div></div></div><p>
104 There must be some gotchas we should record here! Jelmer???
105 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="CUPS-printing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="winbind.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 19. CUPS Printing Support in Samba 3.0 </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 21. Integrated Logon Support using Winbind</td></tr></table></div></body></html>