Changeset 274 for branches/samba-3.3.x/docs/htmldocs/Samba3-HOWTO/VFS.html
- Timestamp:
- Jun 17, 2009, 2:19:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/docs/htmldocs/Samba3-HOWTO/VFS.html
r218 r274 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 23. Stackable VFS modules</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3. 2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support"><link rel="next" href="winbind.html" title="Chapter 24. Winbind: Use of Domain Accounts"></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 23. 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 23. Stackable VFS modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="orgname">Samba Team</span> <span class="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tpot@samba.org">tpot@samba.org</a>></code></p></div></div></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 class="author"><h3 class="author"><span class="firstname">Ed</span> <span class="surname">Riddle</span></h3><span class="contrib">original shadow_copy docs</span> </div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="VFS.html#id2650312">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2650350">Discussion</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2650745">Included Modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2650751">audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2650792">default_quota</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651009">extd_audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#fakeperms">fake_perms</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651336">recycle</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651733">netatalk</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651783">shadow_copy</a></span></dt></dl></dd><dt><span class="sect1"><a href="VFS.html#id2652691">VFS Modules Available Elsewhere</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2652716">DatabaseFS</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2652776">vscan</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2652815">vscan-clamav</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2650312"></a>Features and Benefits</h2></div></div></div><p>2 <a class="indexterm" name="id26503 20"></a>3 <a class="indexterm" name="id26503 29"></a>4 <a class="indexterm" name="id26503 36"></a>1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 23. Stackable VFS modules</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3.3.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="CUPS-printing.html" title="Chapter 22. CUPS Printing Support"><link rel="next" href="winbind.html" title="Chapter 24. Winbind: Use of Domain Accounts"></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 23. 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 23. Stackable VFS modules</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="orgname">Samba Team</span> <span class="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tpot@samba.org">tpot@samba.org</a>></code></p></div></div></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 class="author"><h3 class="author"><span class="firstname">Ed</span> <span class="surname">Riddle</span></h3><span class="contrib">original shadow_copy docs</span> </div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="VFS.html#id2650356">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2650394">Discussion</a></span></dt><dt><span class="sect1"><a href="VFS.html#id2650789">Included Modules</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2650795">audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2650836">default_quota</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651053">extd_audit</a></span></dt><dt><span class="sect2"><a href="VFS.html#fakeperms">fake_perms</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651380">recycle</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651777">netatalk</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2651827">shadow_copy</a></span></dt></dl></dd><dt><span class="sect1"><a href="VFS.html#id2652729">VFS Modules Available Elsewhere</a></span></dt><dd><dl><dt><span class="sect2"><a href="VFS.html#id2652754">DatabaseFS</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2652814">vscan</a></span></dt><dt><span class="sect2"><a href="VFS.html#id2652853">vscan-clamav</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2650356"></a>Features and Benefits</h2></div></div></div><p> 2 <a class="indexterm" name="id2650364"></a> 3 <a class="indexterm" name="id2650373"></a> 4 <a class="indexterm" name="id2650380"></a> 5 5 Stackable VFS (Virtual File System) modules support was new to Samba-3 and has proven quite popular. Samba 6 6 passes each request to access the UNIX file system through the loaded VFS modules. This chapter covers the 7 7 modules that come with the Samba source and provides references to some external modules. 8 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id26503 50"></a>Discussion</h2></div></div></div><p>9 <a class="indexterm" name="id2650 358"></a>10 <a class="indexterm" name="id2650 365"></a>8 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2650394"></a>Discussion</h2></div></div></div><p> 9 <a class="indexterm" name="id2650402"></a> 10 <a class="indexterm" name="id2650409"></a> 11 11 If not supplied with your platform distribution binary Samba package, you may have problems compiling these 12 12 modules, as shared libraries are compiled and linked in different ways on different systems. They currently 13 13 have been tested against GNU/Linux and IRIX. 14 14 </p><p> 15 <a class="indexterm" name="id2650 379"></a>16 <a class="indexterm" name="id2650 386"></a>17 <a class="indexterm" name="id2650 393"></a>15 <a class="indexterm" name="id2650423"></a> 16 <a class="indexterm" name="id2650430"></a> 17 <a class="indexterm" name="id2650437"></a> 18 18 To use the VFS modules, create a share similar to the one below. The important parameter is the <a class="link" href="smb.conf.5.html#VFSOBJECTS" target="_top">vfs objects</a> parameter where you can list one or more VFS modules by name. For example, to log all 19 19 access to files and put deleted files in a recycle bin, see <a class="link" href="VFS.html#vfsrecyc" title="Example 23.1. smb.conf with VFS modules">the smb.conf with VFS 20 20 modules example</a>: 21 </p><div class="example"><a name="vfsrecyc"></a><p class="title"><b>Example 23.1. smb.conf with VFS modules</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[audit]</code></em></td></tr><tr><td><a class="indexterm" name="id26504 48"></a><em class="parameter"><code>comment = Audited /data directory</code></em></td></tr><tr><td><a class="indexterm" name="id2650460"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2650471"></a><em class="parameter"><code>vfs objects = audit recycle</code></em></td></tr><tr><td><a class="indexterm" name="id2650483"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650495"></a><em class="parameter"><code>browseable = yes</code></em></td></tr></table></div></div><br class="example-break"><p>22 <a class="indexterm" name="id26505 10"></a>23 <a class="indexterm" name="id26505 16"></a>24 <a class="indexterm" name="id26505 23"></a>21 </p><div class="example"><a name="vfsrecyc"></a><p class="title"><b>Example 23.1. smb.conf with VFS modules</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[audit]</code></em></td></tr><tr><td><a class="indexterm" name="id2650492"></a><em class="parameter"><code>comment = Audited /data directory</code></em></td></tr><tr><td><a class="indexterm" name="id2650504"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2650515"></a><em class="parameter"><code>vfs objects = audit recycle</code></em></td></tr><tr><td><a class="indexterm" name="id2650527"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650539"></a><em class="parameter"><code>browseable = yes</code></em></td></tr></table></div></div><br class="example-break"><p> 22 <a class="indexterm" name="id2650554"></a> 23 <a class="indexterm" name="id2650560"></a> 24 <a class="indexterm" name="id2650567"></a> 25 25 The modules are used in the order in which they are specified. Let's say that you want to both have a virus 26 26 scanner module and a recycle bin module. It is wise to put the virus scanner module as the first one so that … … 28 28 <a class="link" href="smb.conf.5.html#VFSOBJECTS" target="_top">vfs objects = vscan-clamav recycle</a> 29 29 </p><p> 30 <a class="indexterm" name="id26505 51"></a>31 <a class="indexterm" name="id2650 558"></a>30 <a class="indexterm" name="id2650595"></a> 31 <a class="indexterm" name="id2650602"></a> 32 32 Samba will attempt to load modules from the <code class="filename">/lib</code> directory in the root directory of the 33 33 Samba installation (usually <code class="filename">/usr/lib/samba/vfs</code> or 34 34 <code class="filename">/usr/local/samba/lib/vfs</code>). 35 35 </p><p> 36 <a class="indexterm" name="id2650 588"></a>37 <a class="indexterm" name="id2650 595"></a>38 <a class="indexterm" name="id26506 02"></a>39 <a class="indexterm" name="id26506 08"></a>36 <a class="indexterm" name="id2650632"></a> 37 <a class="indexterm" name="id2650639"></a> 38 <a class="indexterm" name="id2650646"></a> 39 <a class="indexterm" name="id2650652"></a> 40 40 Some modules can be used twice for the same share. This can be done using a configuration similar to the one 41 41 shown in <a class="link" href="VFS.html#multimodule" title="Example 23.2. smb.conf with multiple VFS modules">the smb.conf with multiple VFS modules</a>. 42 42 43 </p><div class="example"><a name="multimodule"></a><p class="title"><b>Example 23.2. smb.conf with multiple VFS modules</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[test]</code></em></td></tr><tr><td><a class="indexterm" name="id26506 48"></a><em class="parameter"><code>comment = VFS TEST</code></em></td></tr><tr><td><a class="indexterm" name="id2650660"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2650671"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650683"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650694"></a><em class="parameter"><code>vfs objects = example:example1 example example:test</code></em></td></tr><tr><td><a class="indexterm" name="id2650706"></a><em class="parameter"><code>example1: parameter = 1</code></em></td></tr><tr><td><a class="indexterm" name="id2650718"></a><em class="parameter"><code>example: parameter = 5</code></em></td></tr><tr><td><a class="indexterm" name="id2650730"></a><em class="parameter"><code>test: parameter = 7</code></em></td></tr></table></div></div><p><br class="example-break">44 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id26507 45"></a>Included Modules</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650751"></a>audit</h3></div></div></div><p>45 <a class="indexterm" name="id2650 759"></a>43 </p><div class="example"><a name="multimodule"></a><p class="title"><b>Example 23.2. smb.conf with multiple VFS modules</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[test]</code></em></td></tr><tr><td><a class="indexterm" name="id2650692"></a><em class="parameter"><code>comment = VFS TEST</code></em></td></tr><tr><td><a class="indexterm" name="id2650704"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2650715"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650727"></a><em class="parameter"><code>browseable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2650738"></a><em class="parameter"><code>vfs objects = example:example1 example example:test</code></em></td></tr><tr><td><a class="indexterm" name="id2650750"></a><em class="parameter"><code>example1: parameter = 1</code></em></td></tr><tr><td><a class="indexterm" name="id2650762"></a><em class="parameter"><code>example: parameter = 5</code></em></td></tr><tr><td><a class="indexterm" name="id2650774"></a><em class="parameter"><code>test: parameter = 7</code></em></td></tr></table></div></div><p><br class="example-break"> 44 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2650789"></a>Included Modules</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650795"></a>audit</h3></div></div></div><p> 45 <a class="indexterm" name="id2650803"></a> 46 46 A simple module to audit file access to the syslog facility. The following operations are logged: 47 47 </p><div class="itemizedlist"><ul type="disc"><li><p>share</p></li><li><p>connect/disconnect</p></li><li><p>directory opens/create/remove</p></li><li><p>file open/close/rename/unlink/chmod</p></li></ul></div><p> 48 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650 792"></a>default_quota</h3></div></div></div><p>48 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2650836"></a>default_quota</h3></div></div></div><p> 49 49 This module allows the default quota values, in the windows explorer GUI, to be stored on a Samba-3 server. 50 50 The challenge is that linux filesystems only store quotas for users and groups, but no default quotas. … … 118 118 ... 119 119 </pre><p> 120 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id26510 09"></a>extd_audit</h3></div></div></div><p>121 <a class="indexterm" name="id26510 17"></a>122 <a class="indexterm" name="id26510 24"></a>123 <a class="indexterm" name="id26510 31"></a>120 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2651053"></a>extd_audit</h3></div></div></div><p> 121 <a class="indexterm" name="id2651061"></a> 122 <a class="indexterm" name="id2651068"></a> 123 <a class="indexterm" name="id2651075"></a> 124 124 This module is identical with the <code class="literal">audit</code> module above except 125 125 that it sends audit logs to both syslog as well as the <code class="literal">smbd</code> log files. The … … 127 127 </p><p> 128 128 Valid settings and the information that will be recorded are shown in <a class="link" href="VFS.html#xtdaudit" title="Table 23.1. Extended Auditing Log Information">the next table</a>. 129 </p><div class="table"><a name="xtdaudit"></a><p class="title"><b>Table 23.1. Extended Auditing Log Information</b></p><div class="table-contents"><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">Make Directory, Remove Directory, Unlink</td></tr><tr><td align="center">1</td><td align="left">Open Directory, Rename File, Change Permissions/ACLs</td></tr><tr><td align="center">2</td><td align="left">Open & Close File</td></tr><tr><td align="center">10</td><td align="left">Maximum Debug Level</td></tr></tbody></table></div></div><br class="table-break"><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2651 166"></a>Configuration of Auditing</h4></div></div></div><p>130 <a class="indexterm" name="id2651 174"></a>131 This auditing tool is more f elxible than most people readily willrecognize. There are a number of ways129 </p><div class="table"><a name="xtdaudit"></a><p class="title"><b>Table 23.1. Extended Auditing Log Information</b></p><div class="table-contents"><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">Make Directory, Remove Directory, Unlink</td></tr><tr><td align="center">1</td><td align="left">Open Directory, Rename File, Change Permissions/ACLs</td></tr><tr><td align="center">2</td><td align="left">Open & Close File</td></tr><tr><td align="center">10</td><td align="left">Maximum Debug Level</td></tr></tbody></table></div></div><br class="table-break"><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2651210"></a>Configuration of Auditing</h4></div></div></div><p> 130 <a class="indexterm" name="id2651218"></a> 131 This auditing tool is more flexible than most people will readily recognize. There are a number of ways 132 132 by which useful logging information can be recorded. 133 133 </p><div class="itemizedlist"><ul type="disc"><li><p>Syslog can be used to record all transaction. This can be disabled by setting … … 146 146 in the <code class="filename">smb.conf</code> file. 147 147 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="fakeperms"></a>fake_perms</h3></div></div></div><p> 148 <a class="indexterm" name="id26513 00"></a>149 <a class="indexterm" name="id26513 07"></a>150 <a class="indexterm" name="id26513 14"></a>151 <a class="indexterm" name="id26513 20"></a>148 <a class="indexterm" name="id2651344"></a> 149 <a class="indexterm" name="id2651351"></a> 150 <a class="indexterm" name="id2651358"></a> 151 <a class="indexterm" name="id2651364"></a> 152 152 This module was created to allow Roaming Profile files and directories to be set (on the Samba server 153 153 under UNIX) as read only. This module will, if installed on the Profiles share, report to the client 154 154 that the Profile files and directories are writeable. This satisfies the client even though the files 155 155 will never be overwritten as the client logs out or shuts down. 156 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id26513 36"></a>recycle</h3></div></div></div><p>157 <a class="indexterm" name="id26513 44"></a>158 <a class="indexterm" name="id26513 50"></a>159 <a class="indexterm" name="id2651 357"></a>156 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2651380"></a>recycle</h3></div></div></div><p> 157 <a class="indexterm" name="id2651388"></a> 158 <a class="indexterm" name="id2651394"></a> 159 <a class="indexterm" name="id2651401"></a> 160 160 A Recycle Bin-like module. Where used, unlink calls will be intercepted and files moved 161 161 to the recycle directory instead of being deleted. This gives the same effect as the 162 162 <span class="guiicon">Recycle Bin</span> on Windows computers. 163 163 </p><p> 164 <a class="indexterm" name="id2651 377"></a>165 <a class="indexterm" name="id2651 384"></a>166 <a class="indexterm" name="id2651 390"></a>167 <a class="indexterm" name="id2651 397"></a>164 <a class="indexterm" name="id2651421"></a> 165 <a class="indexterm" name="id2651428"></a> 166 <a class="indexterm" name="id2651434"></a> 167 <a class="indexterm" name="id2651441"></a> 168 168 The <span class="guiicon">Recycle Bin</span> will not appear in 169 169 <span class="application">Windows Explorer</span> views of the network … … 180 180 </p><p>Supported options for the <code class="literal">recycle</code> module are as follow: 181 181 </p><div class="variablelist"><dl><dt><span class="term">recycle:repository</span></dt><dd><p> 182 <a class="indexterm" name="id2651 475"></a>182 <a class="indexterm" name="id2651519"></a> 183 183 Path of the directory where deleted files should be moved. 184 184 </p></dd><dt><span class="term">recycle:directory_mode</span></dt><dd><p> 185 <a class="indexterm" name="id2651 494"></a>185 <a class="indexterm" name="id2651538"></a> 186 186 Set it to the octal mode you want for the recycle directory. With 187 187 this mode the recycle directory will be created if it not … … 192 192 mode 0700 is used. 193 193 </p></dd><dt><span class="term">recycle:subdir_mode</span></dt><dd><p> 194 <a class="indexterm" name="id26515 30"></a>194 <a class="indexterm" name="id2651574"></a> 195 195 Set it to the octal mode you want for the sub directories of 196 196 the recycle directory. With this mode the sub directories will … … 200 200 <em class="parameter"><code>directory_mode</code></em>. 201 201 </p></dd><dt><span class="term">recycle:keeptree</span></dt><dd><p> 202 <a class="indexterm" name="id2651 564"></a>202 <a class="indexterm" name="id2651608"></a> 203 203 Specifies whether the directory structure should be kept or if the files in the directory that is being 204 204 deleted should be kept separately in the recycle bin. 205 205 </p></dd><dt><span class="term">recycle:versions</span></dt><dd><p> 206 <a class="indexterm" name="id2651 585"></a>206 <a class="indexterm" name="id2651629"></a> 207 207 If this option is set, two files 208 208 with the same name that are deleted will both … … 210 210 of a file will be called “<span class="quote">Copy #x of <em class="replaceable"><code>filename</code></em></span>”. 211 211 </p></dd><dt><span class="term">recycle:touch</span></dt><dd><p> 212 <a class="indexterm" name="id26516 13"></a>212 <a class="indexterm" name="id2651657"></a> 213 213 Specifies whether a file's access date should be touched when the file is moved to the recycle bin. 214 214 </p></dd><dt><span class="term">recycle:touch_mtime</span></dt><dd><p> 215 <a class="indexterm" name="id26516 33"></a>215 <a class="indexterm" name="id2651677"></a> 216 216 Specifies whether a file's last modify date date should be touched when the file is moved to the recycle bin. 217 217 </p></dd><dt><span class="term">recycle:maxsize</span></dt><dd><p> 218 <a class="indexterm" name="id26516 53"></a>218 <a class="indexterm" name="id2651697"></a> 219 219 Files that are larger than the number of bytes specified by this parameter will not be put into the recycle bin. 220 220 </p></dd><dt><span class="term">recycle:exclude</span></dt><dd><p> 221 <a class="indexterm" name="id2651 673"></a>221 <a class="indexterm" name="id2651717"></a> 222 222 List of files that should not be put into the recycle bin when deleted, but deleted in the regular way. 223 223 </p></dd><dt><span class="term">recycle:exclude_dir</span></dt><dd><p> 224 <a class="indexterm" name="id2651 693"></a>224 <a class="indexterm" name="id2651737"></a> 225 225 Contains a list of directories. When files from these directories are 226 226 deleted, they are not put into the … … 228 228 regular way. 229 229 </p></dd><dt><span class="term">recycle:noversions</span></dt><dd><p> 230 <a class="indexterm" name="id26517 14"></a>230 <a class="indexterm" name="id2651758"></a> 231 231 Specifies a list of paths (wildcards such as * and ? are supported) for which no versioning 232 232 should be used. Only useful when <span class="emphasis"><em>recycle:versions</em></span> is enabled. 233 233 </p></dd></dl></div><p> 234 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id26517 33"></a>netatalk</h3></div></div></div><p>235 <a class="indexterm" name="id26517 40"></a>234 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2651777"></a>netatalk</h3></div></div></div><p> 235 <a class="indexterm" name="id2651784"></a> 236 236 A netatalk module will ease co-existence of Samba and netatalk file sharing services. 237 237 </p><p>Advantages compared to the old netatalk module: 238 </p><div class="itemizedlist"><a class="indexterm" name="id26517 55"></a><ul type="disc"><li><p>Does not care about creating .AppleDouble forks, just keeps them in sync.</p></li><li><p>If a share in <code class="filename">smb.conf</code> does not contain .AppleDouble item in hide or veto list, it will be added automatically.</p></li></ul></div><p>239 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2651 783"></a>shadow_copy</h3></div></div></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>240 <a class="indexterm" name="id2651 792"></a>238 </p><div class="itemizedlist"><a class="indexterm" name="id2651799"></a><ul type="disc"><li><p>Does not care about creating .AppleDouble forks, just keeps them in sync.</p></li><li><p>If a share in <code class="filename">smb.conf</code> does not contain .AppleDouble item in hide or veto list, it will be added automatically.</p></li></ul></div><p> 239 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2651827"></a>shadow_copy</h3></div></div></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> 240 <a class="indexterm" name="id2651836"></a> 241 241 <span class="emphasis"><em>THIS IS NOT A BACKUP, ARCHIVAL, OR VERSION CONTROL SOLUTION!</em></span> 242 242 </p><p> 243 <a class="indexterm" name="id26518 06"></a>243 <a class="indexterm" name="id2651850"></a> 244 244 With Samba or Windows servers, shadow_copy is designed to be an end-user tool only. It does not replace or 245 245 enhance your backup and archival solutions and should in no way be considered as such. Additionally, if you … … 252 252 clients. You should be able to get more information about MS Shadow Copy <a class="ulink" href="http://www.microsoft.com/windowsserver2003/techinfo/overview/scr.mspx" target="_top">from the Microsoft's site</a>. 253 253 </p><p> 254 <a class="indexterm" name="id26518 51"></a>255 <a class="indexterm" name="id2651 858"></a>256 <a class="indexterm" name="id2651 865"></a>257 <a class="indexterm" name="id2651 872"></a>258 <a class="indexterm" name="id2651 878"></a>259 <a class="indexterm" name="id2651 885"></a>254 <a class="indexterm" name="id2651894"></a> 255 <a class="indexterm" name="id2651901"></a> 256 <a class="indexterm" name="id2651908"></a> 257 <a class="indexterm" name="id2651915"></a> 258 <a class="indexterm" name="id2651922"></a> 259 <a class="indexterm" name="id2651928"></a> 260 260 The shadow_copy VFS module requires some underlying file system setup with some sort of Logical Volume Manager 261 261 (LVM) such as LVM1, LVM2, or EVMS. Setting up LVM is beyond the scope of this document; however, we will … … 270 270 Linux LVM, Part 1</a> and <a class="ulink" href="http://www-106.ibm.com/developerworks/library/l-lvm2.html" target="_top">Learning 271 271 Linux LWM, Part 2</a> for Daniel Robbins' well-written, two part tutorial on Linux and LVM using LVM 272 source code and reiserfs.</p></li></ul></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id265 1971"></a>Shadow Copy Setup</h4></div></div></div><p>273 <a class="indexterm" name="id265 1979"></a>274 <a class="indexterm" name="id265 1986"></a>272 source code and reiserfs.</p></li></ul></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2652015"></a>Shadow Copy Setup</h4></div></div></div><p> 273 <a class="indexterm" name="id2652023"></a> 274 <a class="indexterm" name="id2652030"></a> 275 275 At the time of this writing, not much testing has been done. I tested the shadow copy VFS module with a 276 276 specific scenario which was not deployed in a production environment, but more as a proof of concept. The … … 287 287 working Samba 3.0.3 or later server running. 288 288 </p></li><li><p><b>Install & Configure LVM. </b> 289 <a class="indexterm" name="id2652 066"></a>290 <a class="indexterm" name="id2652 072"></a>289 <a class="indexterm" name="id2652110"></a> 290 <a class="indexterm" name="id2652116"></a> 291 291 Before you can make shadow copies available to the client, you have to create the shadow copies. This is 292 292 done by taking some sort of file system snapshot. Snapshots are a typical feature of Logical Volume … … 296 296 using the "testing" or "Sarge" distribution. 297 297 </p><ul type="disc"><li><p> 298 <a class="indexterm" name="id2652 097"></a>299 <a class="indexterm" name="id26521 04"></a>300 <a class="indexterm" name="id26521 11"></a>301 <a class="indexterm" name="id26521 18"></a>302 <a class="indexterm" name="id26521 24"></a>298 <a class="indexterm" name="id2652141"></a> 299 <a class="indexterm" name="id2652148"></a> 300 <a class="indexterm" name="id2652155"></a> 301 <a class="indexterm" name="id2652162"></a> 302 <a class="indexterm" name="id2652168"></a> 303 303 Install lvm10 and devfsd packages if you have not done so already. On Debian systems, you are warned of the 304 304 interaction of devfs and lvm1 which requires the use of devfs filenames. Running <code class="literal">apt-get update 305 305 && apt-get install lvm10 devfsd xfsprogs</code> should do the trick for this example. 306 306 </p></li><li><p> 307 <a class="indexterm" name="id26521 48"></a>308 <a class="indexterm" name="id26521 55"></a>309 <a class="indexterm" name="id2652 162"></a>310 <a class="indexterm" name="id2652 169"></a>311 <a class="indexterm" name="id2652 175"></a>307 <a class="indexterm" name="id2652192"></a> 308 <a class="indexterm" name="id2652199"></a> 309 <a class="indexterm" name="id2652206"></a> 310 <a class="indexterm" name="id2652213"></a> 311 <a class="indexterm" name="id2652219"></a> 312 312 Now you need to create a volume. You will need to create a partition (or partitions) to add to your volume. 313 313 Use your favorite partitioning tool (e.g., Linux fdisk, cfdisk, etc.). The partition type should be set to 314 314 0x8e for "Linux LVM." In this example, we will use /dev/hdb1. 315 315 </p><p> 316 <a class="indexterm" name="id2652 190"></a>317 <a class="indexterm" name="id2652 197"></a>318 <a class="indexterm" name="id26522 04"></a>316 <a class="indexterm" name="id2652234"></a> 317 <a class="indexterm" name="id2652241"></a> 318 <a class="indexterm" name="id2652248"></a> 319 319 Once you have the Linux LVM partition (type 0x8e), you can run a series of commands to create the LVM volume. 320 320 You can use several disks and/or partitions, but we will use only one in this example. You may also need to … … 322 322 it on reboot by adding it to (<code class="filename">/etc/modules</code>). 323 323 </p></li><li><p> 324 <a class="indexterm" name="id26522 33"></a>324 <a class="indexterm" name="id2652277"></a> 325 325 Create the physical volume with <code class="literal">pvcreate /dev/hdb1</code> 326 326 </p></li><li><p> 327 <a class="indexterm" name="id26522 51"></a>328 <a class="indexterm" name="id2652 258"></a>327 <a class="indexterm" name="id2652295"></a> 328 <a class="indexterm" name="id2652302"></a> 329 329 Create the volume group and add /dev/hda1 to it with <code class="literal">vgcreate shadowvol /dev/hdb1</code> 330 330 </p><p> 331 <a class="indexterm" name="id2652 275"></a>331 <a class="indexterm" name="id2652319"></a> 332 332 You can use <code class="literal">vgdisplay</code> to review information about the volume group. 333 333 </p></li><li><p> 334 <a class="indexterm" name="id2652 293"></a>334 <a class="indexterm" name="id2652337"></a> 335 335 Now you can create the logical volume with something like <code class="literal">lvcreate -L400M -nsh_test shadowvol</code> 336 336 </p><p> 337 <a class="indexterm" name="id26523 10"></a>337 <a class="indexterm" name="id2652354"></a> 338 338 This creates the logical volume of 400 MBs named "sh_test" in the volume group we created called shadowvol. 339 339 If everything is working so far, you should see them in <code class="filename">/dev/shadowvol</code>. 340 340 </p></li><li><p> 341 <a class="indexterm" name="id26523 31"></a>341 <a class="indexterm" name="id2652375"></a> 342 342 Now we should be ready to format the logical volume we named sh_test with <code class="literal">mkfs.xfs 343 343 /dev/shadowvol/sh_test</code> 344 344 </p><p> 345 <a class="indexterm" name="id26523 48"></a>346 <a class="indexterm" name="id26523 55"></a>347 <a class="indexterm" name="id2652 362"></a>348 <a class="indexterm" name="id2652 369"></a>349 <a class="indexterm" name="id2652 375"></a>345 <a class="indexterm" name="id2652392"></a> 346 <a class="indexterm" name="id2652399"></a> 347 <a class="indexterm" name="id2652406"></a> 348 <a class="indexterm" name="id2652413"></a> 349 <a class="indexterm" name="id2652419"></a> 350 350 You can format the logical volume with any file system you choose, but make sure to use one that allows you to 351 351 take advantage of the additional features of LVM such as freezing, resizing, and growing your file systems. 352 352 </p><p> 353 <a class="indexterm" name="id2652 389"></a>354 <a class="indexterm" name="id2652 396"></a>355 <a class="indexterm" name="id26524 03"></a>353 <a class="indexterm" name="id2652433"></a> 354 <a class="indexterm" name="id2652440"></a> 355 <a class="indexterm" name="id2652447"></a> 356 356 Now we have an LVM volume where we can play with the shadow_copy VFS module. 357 357 </p></li><li><p> 358 <a class="indexterm" name="id26524 16"></a>359 <a class="indexterm" name="id26524 22"></a>360 <a class="indexterm" name="id26524 29"></a>358 <a class="indexterm" name="id2652460"></a> 359 <a class="indexterm" name="id2652466"></a> 360 <a class="indexterm" name="id2652473"></a> 361 361 Now we need to prepare the directory with something like 362 362 </p><pre class="screen"> … … 367 367 once you get things working. 368 368 </p></li><li><p> 369 <a class="indexterm" name="id2652 464"></a>369 <a class="indexterm" name="id2652508"></a> 370 370 Mount the LVM volume using something like <code class="literal">mount /dev/shadowvol/sh_test /data/shadow_share</code> 371 371 </p><p> 372 <a class="indexterm" name="id2652 481"></a>372 <a class="indexterm" name="id2652525"></a> 373 373 You may also want to edit your <code class="filename">/etc/fstab</code> so that this partition mounts during the system boot. 374 374 </p></li></ul></div></li><li><p><b>Install & Configure the shadow_copy VFS Module. </b> … … 376 376 3.0.3 and higher. The smb.conf configuration is pretty standard. Here is our example of a share configured 377 377 with the shadow_copy VFS module: 378 </p><div class="example"><a name="vfsshadow"></a><p class="title"><b>Example 23.3. Share With shadow_copy VFS</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[shadow_share]</code></em></td></tr><tr><td><a class="indexterm" name="id26525 38"></a><em class="parameter"><code>comment = Shadow Copy Enabled Share</code></em></td></tr><tr><td><a class="indexterm" name="id2652550"></a><em class="parameter"><code>path = /data/shadow_share</code></em></td></tr><tr><td><a class="indexterm" name="id2652562"></a><em class="parameter"><code>vfs objects = shadow_copy</code></em></td></tr><tr><td><a class="indexterm" name="id2652574"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2652585"></a><em class="parameter"><code>browseable = yes</code></em></td></tr></table></div></div><br class="example-break"></li><li><p><b>Create Snapshots and Make Them Available to shadow_copy.so. </b>379 <a class="indexterm" name="id26526 09"></a>380 <a class="indexterm" name="id26526 15"></a>381 <a class="indexterm" name="id26526 22"></a>378 </p><div class="example"><a name="vfsshadow"></a><p class="title"><b>Example 23.3. Share With shadow_copy VFS</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[shadow_share]</code></em></td></tr><tr><td><a class="indexterm" name="id2652582"></a><em class="parameter"><code>comment = Shadow Copy Enabled Share</code></em></td></tr><tr><td><a class="indexterm" name="id2652594"></a><em class="parameter"><code>path = /data/shadow_share</code></em></td></tr><tr><td><a class="indexterm" name="id2652606"></a><em class="parameter"><code>vfs objects = shadow_copy</code></em></td></tr><tr><td><a class="indexterm" name="id2652618"></a><em class="parameter"><code>writeable = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2652629"></a><em class="parameter"><code>browseable = yes</code></em></td></tr></table></div></div><br class="example-break"></li><li><p><b>Create Snapshots and Make Them Available to shadow_copy.so. </b> 379 <a class="indexterm" name="id2652653"></a> 380 <a class="indexterm" name="id2652659"></a> 381 <a class="indexterm" name="id2652666"></a> 382 382 Before you can browse the shadow copies, you must create them and mount them. This will most likely be done 383 383 with a script that runs as a cron job. With this particular solution, the shadow_copy VFS module is used to … … 405 405 "properties." If anything has changed, then you will see it on the "Previous Versions" tab of the properties 406 406 window. 407 </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2652 691"></a>VFS Modules Available Elsewhere</h2></div></div></div><p>408 <a class="indexterm" name="id2652 699"></a>407 </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2652729"></a>VFS Modules Available Elsewhere</h2></div></div></div><p> 408 <a class="indexterm" name="id2652737"></a> 409 409 This section contains a listing of various other VFS modules that have been posted but do not currently reside 410 410 in the Samba CVS tree for one reason or another (e.g., it is easy for the maintainer to have his or her own … … 412 412 </p><p> 413 413 No statements about the stability or functionality of any module should be implied due to its presence here. 414 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id26527 16"></a>DatabaseFS</h3></div></div></div><p>415 <a class="indexterm" name="id26527 24"></a>414 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2652754"></a>DatabaseFS</h3></div></div></div><p> 415 <a class="indexterm" name="id2652762"></a> 416 416 URL: <a class="ulink" href="http://www.css.tayloru.edu/~elorimer/databasefs/index.php" target="_top"> 417 417 Taylors University DatabaeFS</a> … … 426 426 Any feedback would be appreciated: comments, suggestions, patches, and so on. If nothing else, it 427 427 might prove useful for someone else who wishes to create a virtual filesystem. 428 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2652 776"></a>vscan</h3></div></div></div><a class="indexterm" name="id2652781"></a><p>URL: <a class="ulink" href="http://www.openantivirus.org/projects.php#samba-vscan" target="_top">428 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2652814"></a>vscan</h3></div></div></div><a class="indexterm" name="id2652820"></a><p>URL: <a class="ulink" href="http://www.openantivirus.org/projects.php#samba-vscan" target="_top"> 429 429 Open Anti-Virus vscan</a> 430 430 </p><p> 431 <a class="indexterm" name="id26528 02"></a>431 <a class="indexterm" name="id2652841"></a> 432 432 samba-vscan is a proof-of-concept module for Samba, which provides on-access anti-virus support for files 433 433 shared using Samba. samba-vscan supports various virus scanners and is maintained by Rainer Link. 434 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id26528 15"></a>vscan-clamav</h3></div></div></div><p>434 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2652853"></a>vscan-clamav</h3></div></div></div><p> 435 435 Samba users have been using the RPMS from SerNet without a problem. 436 436 OpenSUSE Linux users have also used the vscan scanner for quite some time
Note:
See TracChangeset
for help on using the changeset viewer.