- Timestamp:
- Jun 24, 2009, 5:09:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/docs/htmldocs/Samba3-HOWTO/AccessControls.html
r158 r286 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 16. File, Directory, and Share Access Controls</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.7 3.2"><link rel="start" 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="rights.html" title="Chapter 15. User Rights and Privileges"><link rel="next" href="locking.html" title="Chapter 17. File and Record Locking"></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 16. File, Directory, and Share Access Controls</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rights.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="locking.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="AccessControls"></a>Chapter 16. File, Directory, and Share Access Controls</h2></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><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">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><span class="contrib">drawing</span> <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><p class="pubdate">May 10, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="AccessControls.html#id370418">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="AccessControls.html#id370590">File System Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id370602">MS Windows NTFS Comparison with UNIX File Systems</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id370899">Managing Directories</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id371020">File and Directory Access Control</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id371619">Share Definition Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id371650">User- and Group-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id371993">File and Directory Permissions-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id372302">Miscellaneous Controls</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id372617">Access Controls on Shares</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id372753">Share Permissions Management</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id373075">MS Windows Access Control Lists and UNIX Interoperability</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id373081">Managing UNIX Permissions Using NT Security Dialogs</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373121">Viewing File Security on a Samba Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373185">Viewing File Ownership</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373314">Viewing File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373505">Modifying File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373645">Interaction with the Standard Samba “<span class="quote">create mask</span>” Parameters</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id373980">Interaction with the Standard Samba File Attribute Mapping</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id374044">Windows NT/200X ACLs and POSIX ACLs Limitations</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id374405">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id374415">Users Cannot Write to a Public Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id374722">File Operations Done as <span class="emphasis"><em>root</em></span> with <span class="emphasis"><em>force user</em></span> Set</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id374766">MS Word with Samba Changes Owner of File</a></span></dt></dl></dd></dl></div><p>2 <a class="indexterm" name="id 370266"></a>3 <a class="indexterm" name="id 370273"></a>4 <a class="indexterm" name="id 370280"></a>5 <a class="indexterm" name="id 370287"></a>1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 16. File, Directory, and Share Access Controls</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="rights.html" title="Chapter 15. User Rights and Privileges"><link rel="next" href="locking.html" title="Chapter 17. File and Record Locking"></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 16. File, Directory, and Share Access Controls</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rights.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="locking.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="AccessControls"></a>Chapter 16. File, Directory, and Share Access Controls</h2></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">Jeremy</span> <span class="orgname">Samba Team</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>></code></p></div></div></div></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><span class="contrib">drawing</span> <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><p class="pubdate">May 10, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="AccessControls.html#id2610509">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="AccessControls.html#id2610704">File System Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2610719">MS Windows NTFS Comparison with UNIX File Systems</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611055">Managing Directories</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611178">File and Directory Access Control</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2611844">Share Definition Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2611877">User- and Group-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612252">File and Directory Permissions-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612589">Miscellaneous Controls</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2612927">Access Controls on Shares</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613075">Share Permissions Management</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2613422">MS Windows Access Control Lists and UNIX Interoperability</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613428">Managing UNIX Permissions Using NT Security Dialogs</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613475">Viewing File Security on a Samba Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613546">Viewing File Ownership</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613690">Viewing File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613905">Modifying File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614062">Interaction with the Standard Samba create mask Parameters</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614431">Interaction with the Standard Samba File Attribute Mapping</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614504">Windows NT/200X ACLs and POSIX ACLs Limitations</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2614917">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2614928">Users Cannot Write to a Public Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615251">File Operations Done as root with force user Set</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615297">MS Word with Samba Changes Owner of File</a></span></dt></dl></dd></dl></div><p> 2 <a class="indexterm" name="id2610339"></a> 3 <a class="indexterm" name="id2610346"></a> 4 <a class="indexterm" name="id2610353"></a> 5 <a class="indexterm" name="id2610360"></a> 6 6 Advanced MS Windows users are frequently perplexed when file, directory, and share manipulation of 7 7 resources shared via Samba do not behave in the manner they might expect. MS Windows network … … 9 9 provide users with the access they need while protecting resources from unauthorized access. 10 10 </p><p> 11 <a class="indexterm" name="id 370300"></a>12 <a class="indexterm" name="id 370307"></a>11 <a class="indexterm" name="id2610376"></a> 12 <a class="indexterm" name="id2610383"></a> 13 13 Many UNIX administrators are unfamiliar with the MS Windows environment and in particular 14 14 have difficulty in visualizing what the MS Windows user wishes to achieve in attempts to set file 15 15 and directory access permissions. 16 16 </p><p> 17 <a class="indexterm" name="id 370319"></a>18 <a class="indexterm" name="id 370326"></a>19 <a class="indexterm" name="id 370333"></a>20 <a class="indexterm" name="id 370339"></a>17 <a class="indexterm" name="id2610398"></a> 18 <a class="indexterm" name="id2610404"></a> 19 <a class="indexterm" name="id2610411"></a> 20 <a class="indexterm" name="id2610418"></a> 21 21 The problem lies in the differences in how file and directory permissions and controls work 22 22 between the two environments. This difference is one that Samba cannot completely hide, even 23 23 though it does try to bridge the chasm to a degree. 24 24 </p><p> 25 <a class="indexterm" name="id 370350"></a>26 <a class="indexterm" name="id 370357"></a>27 <a class="indexterm" name="id 370366"></a>28 <a class="indexterm" name="id 370373"></a>25 <a class="indexterm" name="id2610431"></a> 26 <a class="indexterm" name="id2610438"></a> 27 <a class="indexterm" name="id2610447"></a> 28 <a class="indexterm" name="id2610454"></a> 29 29 POSIX Access Control List technology has been available (along with extended attributes) 30 30 for UNIX for many years, yet there is little evidence today of any significant use. This … … 33 33 decade-old MS Windows NT operating system. 34 34 </p><p> 35 <a class="indexterm" name="id 370387"></a>35 <a class="indexterm" name="id2610471"></a> 36 36 The purpose of this chapter is to present each of the points of control that are possible with 37 37 Samba-3 in the hope that this will help the network administrator to find the optimum method 38 38 for delivering the best environment for MS Windows desktop users. 39 39 </p><p> 40 <a class="indexterm" name="id 370399"></a>41 <a class="indexterm" name="id 370406"></a>40 <a class="indexterm" name="id2610486"></a> 41 <a class="indexterm" name="id2610493"></a> 42 42 This is an opportune point to mention that Samba was created to provide a means of interoperability 43 43 and interchange of data between differing operating environments. Samba has no intent to change … … 45 45 level of exchange of data between the two environments. What is available today extends well 46 46 beyond early plans and expectations, yet the gap continues to shrink. 47 </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 370418"></a>Features and Benefits</h2></div></div></div><p>47 </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2610509"></a>Features and Benefits</h2></div></div></div><p> 48 48 Samba offers much flexibility in file system access management. These are the key access control 49 49 facilities present in Samba today: 50 50 </p><div class="itemizedlist"><p class="title"><b>Samba Access Control Facilities</b></p><ul type="disc"><li><p> 51 <a class="indexterm" name="id 370437"></a>51 <a class="indexterm" name="id2610529"></a> 52 52 <span class="emphasis"><em>UNIX File and Directory Permissions</em></span> 53 53 </p><p> 54 <a class="indexterm" name="id 370453"></a>55 <a class="indexterm" name="id 370460"></a>56 <a class="indexterm" name="id 370466"></a>54 <a class="indexterm" name="id2610546"></a> 55 <a class="indexterm" name="id2610553"></a> 56 <a class="indexterm" name="id2610560"></a> 57 57 Samba honors and implements UNIX file system access controls. Users 58 58 who access a Samba server will do so as a particular MS Windows user. … … 65 65 <span class="emphasis"><em>Samba Share Definitions</em></span> 66 66 </p><p> 67 <a class="indexterm" name="id 370494"></a>67 <a class="indexterm" name="id2610597"></a> 68 68 In configuring share settings and controls in the <code class="filename">smb.conf</code> file, 69 69 the network administrator can exercise overrides to native file … … 74 74 </p></li><li><p> 75 75 <span class="emphasis"><em>Samba Share ACLs</em></span> 76 <a class="indexterm" name="id 370522"></a>77 </p><p> 78 <a class="indexterm" name="id 370535"></a>76 <a class="indexterm" name="id2610629"></a> 77 </p><p> 78 <a class="indexterm" name="id2610641"></a> 79 79 Just as it is possible in MS Windows NT to set ACLs on shares 80 80 themselves, so it is possible to do in Samba. … … 83 83 do so with minimum invasiveness compared with other methods. 84 84 </p></li><li><p> 85 <a class="indexterm" name="id 370550"></a>86 <a class="indexterm" name="id 370559"></a>85 <a class="indexterm" name="id2610659"></a> 86 <a class="indexterm" name="id2610668"></a> 87 87 <span class="emphasis"><em>MS Windows ACLs through UNIX POSIX ACLs</em></span> 88 88 </p><p> 89 <a class="indexterm" name="id 370575"></a>89 <a class="indexterm" name="id2610684"></a> 90 90 The use of POSIX ACLs on UNIX/Linux is possible only if the underlying 91 91 operating system supports them. If not, then this option will not be … … 95 95 extended attributes enabled. This chapter has pertinent information 96 96 for users of platforms that support them. 97 </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 370590"></a>File System Access Controls</h2></div></div></div><p>97 </p></li></ul></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2610704"></a>File System Access Controls</h2></div></div></div><p> 98 98 Perhaps the most important recognition to be made is the simple fact that MS Windows NT4/200x/XP 99 99 implement a totally divergent file system technology from what is provided in the UNIX operating system 100 100 environment. First we consider what the most significant differences are, then we look 101 101 at how Samba helps to bridge the differences. 102 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 370602"></a>MS Windows NTFS Comparison with UNIX File Systems</h3></div></div></div><p>103 <a class="indexterm" name="id 370610"></a>104 <a class="indexterm" name="id 370617"></a>105 <a class="indexterm" name="id 370624"></a>106 <a class="indexterm" name="id 370633"></a>102 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2610719"></a>MS Windows NTFS Comparison with UNIX File Systems</h3></div></div></div><p> 103 <a class="indexterm" name="id2610727"></a> 104 <a class="indexterm" name="id2610734"></a> 105 <a class="indexterm" name="id2610741"></a> 106 <a class="indexterm" name="id2610750"></a> 107 107 Samba operates on top of the UNIX file system. This means it is subject to UNIX file system conventions 108 108 and permissions. It also means that if the MS Windows networking environment requires file system … … 115 115 the depths of control ability should review the <code class="filename">smb.conf</code> man page. 116 116 </p><p>The following compares file system features for UNIX with those of MS Windows NT/200x: 117 <a class="indexterm" name="id 370662"></a>117 <a class="indexterm" name="id2610785"></a> 118 118 119 119 </p><div class="variablelist"><dl><dt><span class="term">Name Space</span></dt><dd><p> … … 124 124 What MS Windows calls a folder, UNIX calls a directory. 125 125 </p></dd><dt><span class="term">Case Sensitivity</span></dt><dd><p> 126 <a class="indexterm" name="id 370703"></a>127 <a class="indexterm" name="id 370710"></a>126 <a class="indexterm" name="id2610830"></a> 127 <a class="indexterm" name="id2610837"></a> 128 128 MS Windows file names are generally uppercase if made up of 8.3 (8-character file name 129 129 and 3 character extension. File names that are longer than 8.3 are case preserving and case … … 152 152 file listing. 153 153 </p></dd><dt><span class="term">Directory Separators</span></dt><dd><p> 154 <a class="indexterm" name="id 370763"></a>154 <a class="indexterm" name="id2610901"></a> 155 155 MS Windows and DOS use the backslash <code class="constant">\</code> as a directory delimiter, and UNIX uses 156 156 the forward-slash <code class="constant">/</code> as its directory delimiter. This is handled transparently by Samba. 157 157 </p></dd><dt><span class="term">Drive Identification</span></dt><dd><p> 158 <a class="indexterm" name="id 370788"></a>158 <a class="indexterm" name="id2610929"></a> 159 159 MS Windows products support a notion of drive letters, like <code class="literal">C:</code>, to represent 160 160 disk partitions. UNIX has no concept of separate identifiers for file partitions; each … … 163 163 <code class="constant">C:\</code>. 164 164 </p></dd><dt><span class="term">File Naming Conventions</span></dt><dd><p> 165 <a class="indexterm" name="id 370821"></a>165 <a class="indexterm" name="id2610966"></a> 166 166 MS Windows generally never experiences file names that begin with a dot (<code class="constant">.</code>), while in UNIX these 167 167 are commonly found in a user's home directory. Files that begin with a dot (<code class="constant">.</code>) are typically … … 169 169 startup configuration data. 170 170 </p></dd><dt><span class="term">Links and Short-Cuts</span></dt><dd><p> 171 <a class="indexterm" name="id 370848"></a>172 <a class="indexterm" name="id 370858"></a>173 <a class="indexterm" name="id 370867"></a>171 <a class="indexterm" name="id2610996"></a> 172 <a class="indexterm" name="id2611005"></a> 173 <a class="indexterm" name="id2611014"></a> 174 174 MS Windows make use of <span class="emphasis"><em>links and shortcuts</em></span> that are actually special types of files that will 175 175 redirect an attempt to execute the file to the real location of the file. UNIX knows of file and directory … … 184 184 in the process of becoming familiar with UNIX/Linux. These are best left for a text that is dedicated to the 185 185 purpose of UNIX/Linux training and education. 186 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 370899"></a>Managing Directories</h3></div></div></div><p>187 <a class="indexterm" name="id 370907"></a>188 <a class="indexterm" name="id 370914"></a>189 <a class="indexterm" name="id 370921"></a>186 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2611055"></a>Managing Directories</h3></div></div></div><p> 187 <a class="indexterm" name="id2611063"></a> 188 <a class="indexterm" name="id2611070"></a> 189 <a class="indexterm" name="id2611077"></a> 190 190 There are three basic operations for managing directories: <code class="literal">create</code>, <code class="literal">delete</code>, 191 191 <code class="literal">rename</code>. <a class="link" href="AccessControls.html#TOSH-Accesstbl" title="Table 16.1. Managing Directories with UNIX and Windows">Managing Directories with UNIX and 192 192 Windows</a> compares the commands in Windows and UNIX that implement these operations. 193 </p><div class="table"><a name="TOSH-Accesstbl"></a><p class="title"><b>Table 16.1. Managing Directories with UNIX and Windows</b></p><div class="table-contents"><table summary="Managing Directories with UNIX and Windows" border="1"><colgroup><col><col><col></colgroup><thead><tr><th align="center">Action</th><th align="center">MS Windows Command</th><th align="center">UNIX Command</th></tr></thead><tbody><tr><td align="center">create</td><td align="center">md folder</td><td align="center">mkdir folder</td></tr><tr><td align="center">delete</td><td align="center">rd folder</td><td align="center">rmdir folder</td></tr><tr><td align="center">rename</td><td align="center">rename oldname newname</td><td align="center">mv oldname newname</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 371020"></a>File and Directory Access Control</h3></div></div></div><p>194 <a class="indexterm" name="id 371028"></a>195 <a class="indexterm" name="id 371037"></a>196 <a class="indexterm" name="id 371044"></a>193 </p><div class="table"><a name="TOSH-Accesstbl"></a><p class="title"><b>Table 16.1. Managing Directories with UNIX and Windows</b></p><div class="table-contents"><table summary="Managing Directories with UNIX and Windows" border="1"><colgroup><col><col><col></colgroup><thead><tr><th align="center">Action</th><th align="center">MS Windows Command</th><th align="center">UNIX Command</th></tr></thead><tbody><tr><td align="center">create</td><td align="center">md folder</td><td align="center">mkdir folder</td></tr><tr><td align="center">delete</td><td align="center">rd folder</td><td align="center">rmdir folder</td></tr><tr><td align="center">rename</td><td align="center">rename oldname newname</td><td align="center">mv oldname newname</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2611178"></a>File and Directory Access Control</h3></div></div></div><p> 194 <a class="indexterm" name="id2611187"></a> 195 <a class="indexterm" name="id2611196"></a> 196 <a class="indexterm" name="id2611203"></a> 197 197 The network administrator is strongly advised to read basic UNIX training manuals and reference materials 198 198 regarding file and directory permissions maintenance. Much can be achieved with the basic UNIX permissions … … 227 227 Any bit flag may be unset. An unset bit flag is the equivalent of "cannot" and is represented 228 228 as a “<span class="quote">-</span>” character (see <a class="link" href="AccessControls.html#access2" title="Example 16.1. Example File">“Example File”</a>) 229 <a class="indexterm" name="id 371164"></a>230 <a class="indexterm" name="id 371171"></a>231 <a class="indexterm" name="id 371178"></a>232 <a class="indexterm" name="id 371184"></a>233 <a class="indexterm" name="id 371191"></a>234 <a class="indexterm" name="id 371198"></a>229 <a class="indexterm" name="id2611344"></a> 230 <a class="indexterm" name="id2611351"></a> 231 <a class="indexterm" name="id2611358"></a> 232 <a class="indexterm" name="id2611365"></a> 233 <a class="indexterm" name="id2611371"></a> 234 <a class="indexterm" name="id2611378"></a> 235 235 </p><div class="example"><a name="access2"></a><p class="title"><b>Example 16.1. Example File</b></p><div class="example-contents"><pre class="programlisting"> 236 236 -rwxr-x--- Means: … … 239 239 ^^^ everyone else cannot do anything with it. 240 240 </pre></div></div><br class="example-break"><p> 241 <a class="indexterm" name="id 371225"></a>242 <a class="indexterm" name="id 371232"></a>243 <a class="indexterm" name="id 371239"></a>244 <a class="indexterm" name="id 371246"></a>241 <a class="indexterm" name="id2611408"></a> 242 <a class="indexterm" name="id2611415"></a> 243 <a class="indexterm" name="id2611422"></a> 244 <a class="indexterm" name="id2611428"></a> 245 245 Additional possibilities in the [type] field are c = character device, b = block device, p = pipe device, 246 246 s = UNIX Domain Socket. 247 247 </p><p> 248 <a class="indexterm" name="id 371257"></a>249 <a class="indexterm" name="id 371264"></a>250 <a class="indexterm" name="id 371271"></a>251 <a class="indexterm" name="id 371277"></a>252 <a class="indexterm" name="id 371284"></a>248 <a class="indexterm" name="id2611441"></a> 249 <a class="indexterm" name="id2611448"></a> 250 <a class="indexterm" name="id2611454"></a> 251 <a class="indexterm" name="id2611461"></a> 252 <a class="indexterm" name="id2611468"></a> 253 253 The letters <code class="constant">rwxXst</code> set permissions for the user, group, and others as read (r), write (w), 254 254 execute (or access for directories) (x), execute only if the file is a directory or already has execute 255 255 permission for some user (X), set user (SUID) or group ID (SGID) on execution (s), sticky (t). 256 256 </p><p> 257 <a class="indexterm" name="id 371300"></a>258 <a class="indexterm" name="id 371307"></a>259 <a class="indexterm" name="id 371314"></a>260 <a class="indexterm" name="id 371321"></a>257 <a class="indexterm" name="id2611487"></a> 258 <a class="indexterm" name="id2611494"></a> 259 <a class="indexterm" name="id2611500"></a> 260 <a class="indexterm" name="id2611507"></a> 261 261 When the sticky bit is set on a directory, files in that directory may be unlinked (deleted) or renamed only by root or their owner. 262 262 Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on 263 263 directories, such as <code class="filename">/tmp</code>, that are world-writable. 264 264 </p><p> 265 <a class="indexterm" name="id 371340"></a>266 <a class="indexterm" name="id 371346"></a>267 <a class="indexterm" name="id 371353"></a>268 <a class="indexterm" name="id 371360"></a>269 <a class="indexterm" name="id 371369"></a>265 <a class="indexterm" name="id2611529"></a> 266 <a class="indexterm" name="id2611535"></a> 267 <a class="indexterm" name="id2611542"></a> 268 <a class="indexterm" name="id2611549"></a> 269 <a class="indexterm" name="id2611558"></a> 270 270 When the set user or group ID bit (s) is set on a directory, then all files created within it will be owned by the user and/or 271 271 group whose `set user or group' bit is set. This can be helpful in setting up directories for which it is desired that … … 277 277 directory but cannot create new files. If files in the directory are set to be readable and writable for the group, then 278 278 group members will be able to write to (or delete) them. 279 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 371394"></a>Protecting Directories and Files from Deletion</h4></div></div></div><p>280 <a class="indexterm" name="id 371402"></a>281 <a class="indexterm" name="id 371409"></a>282 <a class="indexterm" name="id 371415"></a>283 <a class="indexterm" name="id 371422"></a>279 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2611590"></a>Protecting Directories and Files from Deletion</h4></div></div></div><p> 280 <a class="indexterm" name="id2611599"></a> 281 <a class="indexterm" name="id2611606"></a> 282 <a class="indexterm" name="id2611613"></a> 283 <a class="indexterm" name="id2611620"></a> 284 284 People have asked on the Samba mailing list how is it possible to protect files or directories from deletion by users. 285 285 For example, Windows NT/2K/XP provides the capacity to set access controls on a directory into which people can … … 289 289 directory that contains a file and has write permission for it has the capability to delete it. 290 290 </p><p> 291 <a class="indexterm" name="id 371438"></a>292 <a class="indexterm" name="id 371445"></a>293 <a class="indexterm" name="id 371452"></a>291 <a class="indexterm" name="id2611641"></a> 292 <a class="indexterm" name="id2611648"></a> 293 <a class="indexterm" name="id2611655"></a> 294 294 For the record, in the UNIX environment the ability to delete a file is controlled by the permissions on 295 295 the directory that the file is in. In other words, a user can delete a file in a directory to which that 296 296 user has write access, even if that user does not own the file. 297 297 </p><p> 298 <a class="indexterm" name="id 371464"></a>299 <a class="indexterm" name="id 371471"></a>300 <a class="indexterm" name="id 371478"></a>301 <a class="indexterm" name="id 371484"></a>298 <a class="indexterm" name="id2611670"></a> 299 <a class="indexterm" name="id2611677"></a> 300 <a class="indexterm" name="id2611684"></a> 301 <a class="indexterm" name="id2611691"></a> 302 302 Of necessity, Samba is subject to the file system semantics of the host operating system. Samba is therefore 303 303 limited in the file system capabilities that can be made available through Windows ACLs, and therefore performs … … 306 306 the appropriate extended attribute. 307 307 </p><p> 308 <a class="indexterm" name="id 371502"></a>309 <a class="indexterm" name="id 371509"></a>310 <a class="indexterm" name="id 371516"></a>311 <a class="indexterm" name="id 371522"></a>308 <a class="indexterm" name="id2611712"></a> 309 <a class="indexterm" name="id2611719"></a> 310 <a class="indexterm" name="id2611726"></a> 311 <a class="indexterm" name="id2611733"></a> 312 312 The specific semantics of the extended attributes are not consistent across UNIX and UNIX-like systems such as Linux. 313 313 For example, it is possible on some implementations of the extended attributes to set a flag that prevents the directory … … 323 323 A simple test can be done to check if the immutible flag is supported on files in the file system of the Samba host 324 324 server. 325 </p><div class="procedure"><a name="id 371553"></a><p class="title"><b>Procedure 16.1. Test for File Immutibility Support</b></p><ol type="1"><li><p>325 </p><div class="procedure"><a name="id2611771"></a><p class="title"><b>Procedure 16.1. Test for File Immutibility Support</b></p><ol type="1"><li><p> 326 326 Create a file called <code class="filename">filename</code>. 327 327 </p></li><li><p> … … 341 341 immutable directories are writable. If they are not, then the entire directory and its contents will effectively 342 342 be protected from writing (file creation also) and deletion. 343 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 371619"></a>Share Definition Access Controls</h2></div></div></div><p>344 <a class="indexterm" name="id 371627"></a>343 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2611844"></a>Share Definition Access Controls</h2></div></div></div><p> 344 <a class="indexterm" name="id2611852"></a> 345 345 The following parameters in the <code class="filename">smb.conf</code> file sections define a share control or affect access controls. 346 346 Before using any of the following options, please refer to the man page for <code class="filename">smb.conf</code>. 347 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 371650"></a>User- and Group-Based Controls</h3></div></div></div><p>347 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2611877"></a>User- and Group-Based Controls</h3></div></div></div><p> 348 348 User- and group-based controls can prove quite useful. In some situations it is distinctly desirable to 349 349 force all file system operations as if a single user were doing so. The use of the 350 <a class="link" href="smb.conf.5.html#FORCEUSER" >force user</a> and <a class="link" href="smb.conf.5.html#FORCEGROUP">force group</a> behavior will achieve this.350 <a class="link" href="smb.conf.5.html#FORCEUSER" target="_top">force user</a> and <a class="link" href="smb.conf.5.html#FORCEGROUP" target="_top">force group</a> behavior will achieve this. 351 351 In other situations it may be necessary to use a paranoia level of control to ensure that only particular 352 352 authorized persons will be able to access a share or its contents. Here the use of the 353 <a class="link" href="smb.conf.5.html#VALIDUSERS" >valid users</a> or the <a class="link" href="smb.conf.5.html#INVALIDUSERS">invalid users</a> parameter may be useful.353 <a class="link" href="smb.conf.5.html#VALIDUSERS" target="_top">valid users</a> or the <a class="link" href="smb.conf.5.html#INVALIDUSERS" target="_top">invalid users</a> parameter may be useful. 354 354 </p><p> 355 355 As always, it is highly advisable to use the easiest to maintain and the least ambiguous method for … … 359 359 </p><p> 360 360 <a class="link" href="AccessControls.html#ugbc" title="Table 16.2. User- and Group-Based Controls">User and Group Based Controls</a> enumerates these controls. 361 </p><div class="table"><a name="ugbc"></a><p class="title"><b>Table 16.2. User- and Group-Based Controls</b></p><div class="table-contents"><table summary="User- and Group-Based Controls" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="center">Control Parameter</th><th align="center">Description, Action, Notes</th></tr></thead><tbody><tr><td align="left"><a class="link" href="smb.conf.5.html#ADMINUSERS" >admin users</a></td><td align="justify"><p>361 </p><div class="table"><a name="ugbc"></a><p class="title"><b>Table 16.2. User- and Group-Based Controls</b></p><div class="table-contents"><table summary="User- and Group-Based Controls" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="center">Control Parameter</th><th align="center">Description, Action, Notes</th></tr></thead><tbody><tr><td align="left"><a class="link" href="smb.conf.5.html#ADMINUSERS" target="_top">admin users</a></td><td align="justify"><p> 362 362 List of users who will be granted administrative privileges on the share. 363 363 They will do all file operations as the superuser (root). 364 364 Users in this list will be able to do anything they like on the share, 365 365 irrespective of file permissions. 366 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEGROUP" >force group</a></td><td align="justify"><p>366 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEGROUP" target="_top">force group</a></td><td align="justify"><p> 367 367 Specifies a UNIX group name that will be assigned as the default primary group 368 368 for all users connecting to this service. 369 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEUSER" >force user</a></td><td align="justify"><p>369 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEUSER" target="_top">force user</a></td><td align="justify"><p> 370 370 Specifies a UNIX username that will be assigned as the default user for all users connecting to this service. 371 371 This is useful for sharing files. Incorrect use can cause security problems. 372 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#GUESTOK" >guest ok</a></td><td align="justify"><p>372 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#GUESTOK" target="_top">guest ok</a></td><td align="justify"><p> 373 373 If this parameter is set for a service, then no password is required to connect to the service. Privileges will be 374 374 those of the guest account. 375 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#INVALIDUSERS" >invalid users</a></td><td align="justify"><p>375 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#INVALIDUSERS" target="_top">invalid users</a></td><td align="justify"><p> 376 376 List of users that should not be allowed to login to this service. 377 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#ONLYUSER" >only user</a></td><td align="justify"><p>377 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#ONLYUSER" target="_top">only user</a></td><td align="justify"><p> 378 378 Controls whether connections with usernames not in the user list will be allowed. 379 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#READLIST" >read list</a></td><td align="justify"><p>379 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#READLIST" target="_top">read list</a></td><td align="justify"><p> 380 380 List of users that are given read-only access to a service. Users in this list 381 381 will not be given write access, no matter what the read-only option is set to. 382 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#USERNAME" >username</a></td><td align="justify"><p>382 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#USERNAME" target="_top">username</a></td><td align="justify"><p> 383 383 Refer to the <code class="filename">smb.conf</code> man page for more information; this is a complex and potentially misused parameter. 384 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#VALIDUSERS" >valid users</a></td><td align="justify"><p>384 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#VALIDUSERS" target="_top">valid users</a></td><td align="justify"><p> 385 385 List of users that should be allowed to login to this service. 386 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#WRITELIST" >write list</a></td><td align="justify"><p>386 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#WRITELIST" target="_top">write list</a></td><td align="justify"><p> 387 387 List of users that are given read-write access to a service. 388 </p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 371993"></a>File and Directory Permissions-Based Controls</h3></div></div></div><p>388 </p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2612252"></a>File and Directory Permissions-Based Controls</h3></div></div></div><p> 389 389 Directory permission-based controls, if misused, can result in considerable difficulty in diagnosing the causes of 390 390 misconfiguration. Use them sparingly and carefully. By gradually introducing each, one at a time, undesirable side … … 394 394 Refer to <a class="link" href="AccessControls.html#fdpbc" title="Table 16.3. File and Directory Permission-Based Controls">File and Directory Permission Based Controls</a> for information 395 395 regarding the parameters that may be used to set file and directory permission-based access controls. 396 </p><div class="table"><a name="fdpbc"></a><p class="title"><b>Table 16.3. File and Directory Permission-Based Controls</b></p><div class="table-contents"><table summary="File and Directory Permission-Based Controls" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="center">Control Parameter</th><th align="center">Description, Action, Notes</th></tr></thead><tbody><tr><td align="left"><a class="link" href="smb.conf.5.html#CREATEMASK" >create mask</a></td><td align="justify"><p>396 </p><div class="table"><a name="fdpbc"></a><p class="title"><b>Table 16.3. File and Directory Permission-Based Controls</b></p><div class="table-contents"><table summary="File and Directory Permission-Based Controls" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="center">Control Parameter</th><th align="center">Description, Action, Notes</th></tr></thead><tbody><tr><td align="left"><a class="link" href="smb.conf.5.html#CREATEMASK" target="_top">create mask</a></td><td align="justify"><p> 397 397 Refer to the <code class="filename">smb.conf</code> man page. 398 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#DIRECTORYMASK" >directory mask</a></td><td align="justify"><p>398 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#DIRECTORYMASK" target="_top">directory mask</a></td><td align="justify"><p> 399 399 The octal modes used when converting DOS modes to UNIX modes when creating UNIX directories. 400 400 See also directory security mask. 401 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#DOSFILEMODE" >dos filemode</a></td><td align="justify"><p>401 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#DOSFILEMODE" target="_top">dos filemode</a></td><td align="justify"><p> 402 402 Enabling this parameter allows a user who has write access to the file to modify the permissions on it. 403 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCECREATEMODE" >force create mode</a></td><td align="justify"><p>403 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCECREATEMODE" target="_top">force create mode</a></td><td align="justify"><p> 404 404 This parameter specifies a set of UNIX-mode bit permissions that will always be set on a file created by Samba. 405 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEDIRECTORYMODE" >force directory mode</a></td><td align="justify"><p>405 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEDIRECTORYMODE" target="_top">force directory mode</a></td><td align="justify"><p> 406 406 This parameter specifies a set of UNIX-mode bit permissions that will always be set on a directory created by Samba. 407 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEDIRECTORYSECURITYMODE" >force directory security mode</a></td><td align="justify"><p>407 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCEDIRECTORYSECURITYMODE" target="_top">force directory security mode</a></td><td align="justify"><p> 408 408 Controls UNIX permission bits modified when a Windows NT client is manipulating UNIX permissions on a directory. 409 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCESECURITYMODE" >force security mode</a></td><td align="justify"><p>409 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#FORCESECURITYMODE" target="_top">force security mode</a></td><td align="justify"><p> 410 410 Controls UNIX permission bits modified when a Windows NT client manipulates UNIX permissions. 411 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#HIDEUNREADABLE" >hide unreadable</a></td><td align="justify"><p>411 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#HIDEUNREADABLE" target="_top">hide unreadable</a></td><td align="justify"><p> 412 412 Prevents clients from seeing the existence of files that cannot be read. 413 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#HIDEUNWRITEABLEFILES" >hide unwriteable files</a></td><td align="justify"><p>413 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#HIDEUNWRITEABLEFILES" target="_top">hide unwriteable files</a></td><td align="justify"><p> 414 414 Prevents clients from seeing the existence of files that cannot be written to. Unwritable directories are shown as usual. 415 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#NTACLSUPPORT" >nt acl support</a></td><td align="justify"><p>415 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#NTACLSUPPORT" target="_top">nt acl support</a></td><td align="justify"><p> 416 416 This parameter controls whether smbd will attempt to map UNIX permissions into Windows NT ACLs. 417 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#SECURITYMASK" >security mask</a></td><td align="justify"><p>417 </p></td></tr><tr><td align="left"><a class="link" href="smb.conf.5.html#SECURITYMASK" target="_top">security mask</a></td><td align="justify"><p> 418 418 Controls UNIX permission bits modified when a Windows NT client is manipulating the UNIX permissions on a file. 419 </p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 372302"></a>Miscellaneous Controls</h3></div></div></div><p>419 </p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2612589"></a>Miscellaneous Controls</h3></div></div></div><p> 420 420 The parameter documented in <a class="link" href="AccessControls.html#mcoc" title="Table 16.4. Other Controls">Other Controls</a> are often used by administrators 421 421 in ways that create inadvertent barriers to file access. Such are the consequences of not understanding the 422 422 full implications of <code class="filename">smb.conf</code> file settings. 423 423 </p><div class="table"><a name="mcoc"></a><p class="title"><b>Table 16.4. Other Controls</b></p><div class="table-contents"><table summary="Other Controls" border="1"><colgroup><col align="justify"><col align="justify"></colgroup><thead><tr><th align="center">Control Parameter</th><th align="center">Description, Action, Notes</th></tr></thead><tbody><tr><td align="justify"> 424 <a class="link" href="smb.conf.5.html#CASESENSITIVE" >case sensitive</a>,425 <a class="link" href="smb.conf.5.html#DEFAULTCASE" >default case</a>,426 <a class="link" href="smb.conf.5.html#SHORTPRESERVECASE" >short preserve case</a>424 <a class="link" href="smb.conf.5.html#CASESENSITIVE" target="_top">case sensitive</a>, 425 <a class="link" href="smb.conf.5.html#DEFAULTCASE" target="_top">default case</a>, 426 <a class="link" href="smb.conf.5.html#SHORTPRESERVECASE" target="_top">short preserve case</a> 427 427 </td><td align="justify"><p> 428 428 This means that all file name lookup will be done in a case-sensitive manner. 429 429 Files will be created with the precise file name Samba received from the MS Windows client. 430 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#CSCPOLICY" >csc policy</a></td><td align="justify"><p>430 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#CSCPOLICY" target="_top">csc policy</a></td><td align="justify"><p> 431 431 Client-side caching policy parallels MS Windows client-side file caching capabilities. 432 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DONTDESCEND" >dont descend</a></td><td align="justify"><p>432 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DONTDESCEND" target="_top">dont descend</a></td><td align="justify"><p> 433 433 Allows specifying a comma-delimited list of directories that the server should always show as empty. 434 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DOSFILETIMERESOLUTION" >dos filetime resolution</a></td><td align="justify"><p>434 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DOSFILETIMERESOLUTION" target="_top">dos filetime resolution</a></td><td align="justify"><p> 435 435 This option is mainly used as a compatibility option for Visual C++ when used against Samba shares. 436 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DOSFILETIMES" >dos filetimes</a></td><td align="justify"><p>436 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#DOSFILETIMES" target="_top">dos filetimes</a></td><td align="justify"><p> 437 437 DOS and Windows allow users to change file timestamps if they can write to the file. POSIX semantics prevent this. 438 438 This option allows DOS and Windows behavior. 439 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#FAKEOPLOCKS" >fake oplocks</a></td><td align="justify"><p>439 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#FAKEOPLOCKS" target="_top">fake oplocks</a></td><td align="justify"><p> 440 440 Oplocks are the way that SMB clients get permission from a server to locally cache file operations. If a server grants an 441 441 oplock, the client is free to assume that it is the only one accessing the file, and it will aggressively cache file data. 442 442 </p></td></tr><tr><td align="justify"> 443 <a class="link" href="smb.conf.5.html#HIDEDOTFILES" >hide dot files</a>,444 <a class="link" href="smb.conf.5.html#HIDEFILES" >hide files</a>,445 <a class="link" href="smb.conf.5.html#VETOFILES" >veto files</a>443 <a class="link" href="smb.conf.5.html#HIDEDOTFILES" target="_top">hide dot files</a>, 444 <a class="link" href="smb.conf.5.html#HIDEFILES" target="_top">hide files</a>, 445 <a class="link" href="smb.conf.5.html#VETOFILES" target="_top">veto files</a> 446 446 </td><td align="justify"><p> 447 447 Note: MS Windows Explorer allows override of files marked as hidden so they will still be visible. 448 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#READONLY" >read only</a></td><td align="justify"><p>448 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#READONLY" target="_top">read only</a></td><td align="justify"><p> 449 449 If this parameter is yes, then users of a service may not create or modify files in the service's directory. 450 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#VETOFILES" >veto files</a></td><td align="justify"><p>450 </p></td></tr><tr><td align="justify"><a class="link" href="smb.conf.5.html#VETOFILES" target="_top">veto files</a></td><td align="justify"><p> 451 451 List of files and directories that are neither visible nor accessible. 452 </p></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 372617"></a>Access Controls on Shares</h2></div></div></div><p>453 <a class="indexterm" name="id 372625"></a>454 <a class="indexterm" name="id 372632"></a>455 <a class="indexterm" name="id 372639"></a>456 <a class="indexterm" name="id 372646"></a>457 <a class="indexterm" name="id 372652"></a>452 </p></td></tr></tbody></table></div></div><br class="table-break"></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2612927"></a>Access Controls on Shares</h2></div></div></div><p> 453 <a class="indexterm" name="id2612935"></a> 454 <a class="indexterm" name="id2612941"></a> 455 <a class="indexterm" name="id2612948"></a> 456 <a class="indexterm" name="id2612956"></a> 457 <a class="indexterm" name="id2612962"></a> 458 458 This section deals with how to configure Samba per-share access control restrictions. 459 459 By default, Samba sets no restrictions on the share itself. Restrictions on the share itself … … 462 462 the global user <code class="constant">Everyone - Full Control</code> (full control, change and read). 463 463 </p><p> 464 <a class="indexterm" name="id 372672"></a>465 <a class="indexterm" name="id 372679"></a>466 <a class="indexterm" name="id 372685"></a>464 <a class="indexterm" name="id2612986"></a> 465 <a class="indexterm" name="id2612993"></a> 466 <a class="indexterm" name="id2612999"></a> 467 467 At this time Samba does not provide a tool for configuring access control settings on the share 468 468 itself the only way to create those settings is to use either the NT4 Server Manager or the Windows 200x … … 470 470 this capability in the Samba command-line tool set. 471 471 </p><p> 472 <a class="indexterm" name="id 372698"></a>473 <a class="indexterm" name="id 372705"></a>474 <a class="indexterm" name="id 372712"></a>475 <a class="indexterm" name="id 372719"></a>472 <a class="indexterm" name="id2613016"></a> 473 <a class="indexterm" name="id2613022"></a> 474 <a class="indexterm" name="id2613030"></a> 475 <a class="indexterm" name="id2613036"></a> 476 476 Samba stores the per-share access control settings in a file called <code class="filename">share_info.tdb</code>. 477 477 The location of this file on your system will depend on how Samba was compiled. The default location … … 479 479 utility has been compiled and installed on your system, then you can examine the contents of this file 480 480 by executing <code class="literal">tdbdump share_info.tdb</code> in the directory containing the tdb files. 481 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 372753"></a>Share Permissions Management</h3></div></div></div><p>481 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613075"></a>Share Permissions Management</h3></div></div></div><p> 482 482 The best tool for share permissions management is platform-dependent. Choose the best tool for your environment. 483 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 372763"></a>Windows NT4 Workstation/Server</h4></div></div></div><p>484 <a class="indexterm" name="id 372771"></a>485 <a class="indexterm" name="id 372778"></a>486 <a class="indexterm" name="id 372785"></a>487 <a class="indexterm" name="id 372792"></a>483 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613086"></a>Windows NT4 Workstation/Server</h4></div></div></div><p> 484 <a class="indexterm" name="id2613094"></a> 485 <a class="indexterm" name="id2613101"></a> 486 <a class="indexterm" name="id2613108"></a> 487 <a class="indexterm" name="id2613115"></a> 488 488 The tool you need to manage share permissions on a Samba server from a Windows NT4 Workstation or Server 489 489 is the NT Server Manager. Server Manager is shipped with Windows NT4 Server products but not with Windows 490 490 NT4 Workstation. You can obtain the NT Server Manager for MS Windows NT4 Workstation from the Microsoft 491 491 web site <a class="ulink" href="http://support.microsoft.com/default.aspx?scid=kb;en-us;173673" target="_top">support</a> section. 492 </p><div class="procedure"><a name="id 372809"></a><p class="title"><b>Procedure 16.2. Instructions</b></p><ol type="1"><li><p>492 </p><div class="procedure"><a name="id2613136"></a><p class="title"><b>Procedure 16.2. Instructions</b></p><ol type="1"><li><p> 493 493 Launch the <span class="application">NT4 Server Manager</span> and click on the Samba server you want to 494 494 administer. From the menu select <span class="guimenu">Computer</span>, then click on … … 497 497 Click on the share that you wish to manage and click the <span class="guilabel">Properties</span> tab, then click 498 498 the <span class="guilabel">Permissions</span> tab. Now you can add or change access control settings as you wish. 499 </p></li></ol></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 372862"></a>Windows 200x/XP</h4></div></div></div><p>500 <a class="indexterm" name="id 372870"></a>501 <a class="indexterm" name="id 372876"></a>502 <a class="indexterm" name="id 372883"></a>503 <a class="indexterm" name="id 372890"></a>499 </p></li></ol></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613191"></a>Windows 200x/XP</h4></div></div></div><p> 500 <a class="indexterm" name="id2613199"></a> 501 <a class="indexterm" name="id2613206"></a> 502 <a class="indexterm" name="id2613213"></a> 503 <a class="indexterm" name="id2613220"></a> 504 504 On <span class="application">MS Windows NT4/200x/XP</span> system, ACLs on the share itself are set using native 505 505 tools, usually from File Manager. For example, in Windows 200x, right-click on the shared folder, … … 507 507 Windows NT4/200x permission allows "Everyone" full control on the share. 508 508 </p><p> 509 <a class="indexterm" name="id 372920"></a>510 <a class="indexterm" name="id 372927"></a>511 <a class="indexterm" name="id 372934"></a>509 <a class="indexterm" name="id2613253"></a> 510 <a class="indexterm" name="id2613260"></a> 511 <a class="indexterm" name="id2613266"></a> 512 512 MS Windows 200x and later versions come with a tool called the <span class="application">Computer Management</span> 513 513 snap-in for the MMC. This tool is located by clicking on <span class="guimenu">Control Panel -> 514 514 Administrative Tools -> Computer Management</span>. 515 </p><div class="procedure"><a name="id 372955"></a><p class="title"><b>Procedure 16.3. Instructions</b></p><ol type="1"><li><p>515 </p><div class="procedure"><a name="id2613290"></a><p class="title"><b>Procedure 16.3. Instructions</b></p><ol type="1"><li><p> 516 516 After launching the MMC with the Computer Management snap-in, click the menu item <span class="guimenuitem">Action</span> 517 517 and select <span class="guilabel">Connect to another computer</span>. If you are not logged onto a domain you will be prompted … … 524 524 <span class="guilabel">Shared Folders</span> in the left panel. 525 525 </p></li><li><p> 526 <a class="indexterm" name="id 373031"></a>526 <a class="indexterm" name="id2613372"></a> 527 527 In the right panel, double-click on the share on which you wish to set access control permissions. 528 528 Then click the tab <span class="guilabel">Share Permissions</span>. It is now possible to add access control entities … … 535 535 part of the group <code class="constant">Everyone</code> will have no access even if she is given explicit full 536 536 control access. 537 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 373075"></a>MS Windows Access Control Lists and UNIX Interoperability</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id373081"></a>Managing UNIX Permissions Using NT Security Dialogs</h3></div></div></div><p>538 <a class="indexterm" name="id 373089"></a>537 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2613422"></a>MS Windows Access Control Lists and UNIX Interoperability</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613428"></a>Managing UNIX Permissions Using NT Security Dialogs</h3></div></div></div><p> 538 <a class="indexterm" name="id2613437"></a> 539 539 Windows NT clients can use their native security settings dialog box to view and modify the 540 540 underlying UNIX permissions. … … 550 550 user as it is presented by Samba at the point of file access. This can best be determined from the 551 551 Samba log files. 552 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 373121"></a>Viewing File Security on a Samba Share</h3></div></div></div><p>552 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613475"></a>Viewing File Security on a Samba Share</h3></div></div></div><p> 553 553 From an NT4/2000/XP client, right-click on any file or directory in a Samba-mounted drive letter 554 554 or UNC path. When the menu pops up, click on the <span class="guilabel">Properties</span> entry at the bottom … … 561 561 nonfunctional with a Samba share at this time, because the only useful button, the <span class="guibutton">Add</span> 562 562 button, will not currently allow a list of users to be seen. 563 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 373185"></a>Viewing File Ownership</h3></div></div></div><p>563 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613546"></a>Viewing File Ownership</h3></div></div></div><p> 564 564 Clicking on the <span class="guibutton">Ownership</span> button brings up a dialog box telling you who owns 565 565 the given file. The owner name will be displayed like this: … … 572 572 Click on the <span class="guibutton">Close</span> button to remove this dialog. 573 573 </p><p> 574 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" >nt acl support</a> is set to <code class="constant">false</code>,574 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" target="_top">nt acl support</a> is set to <code class="constant">false</code>, 575 575 the file owner will be shown as the NT user <span class="emphasis"><em>Everyone</em></span>. 576 576 </p><p> 577 <a class="indexterm" name="id 373253"></a>577 <a class="indexterm" name="id2613620"></a> 578 578 The <span class="guibutton">Take Ownership</span> button will not allow you to change the ownership of this file to 579 579 yourself (clicking it will display a dialog box complaining that the user as whom you are currently logged onto … … 583 583 not work with Samba at this time. 584 584 </p><p> 585 <a class="indexterm" name="id 373277"></a>586 <a class="indexterm" name="id 373284"></a>587 <a class="indexterm" name="id 373290"></a>585 <a class="indexterm" name="id2613649"></a> 586 <a class="indexterm" name="id2613655"></a> 587 <a class="indexterm" name="id2613662"></a> 588 588 There is an NT <code class="literal">chown</code> command that will work with Samba and allow a user with administrator 589 589 privilege connected to a Samba server as root to change the ownership of files on both a local NTFS file system 590 590 or remote mounted NTFS or Samba drive. This is available as part of the <span class="application">Seclib</span> NT 591 591 security library written by Jeremy Allison of the Samba Team and is downloadable from the main Samba FTP site. 592 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 373314"></a>Viewing File or Directory Permissions</h3></div></div></div><p>592 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613690"></a>Viewing File or Directory Permissions</h3></div></div></div><p> 593 593 The third button is the <span class="guibutton">Permissions</span> button. Clicking on it brings up a dialog box 594 594 that shows both the permissions and the UNIX owner of the file or directory. The owner is displayed like this: … … 599 599 <em class="replaceable"><code>(Long name)</code></em> is the descriptive string identifying the user (normally found in the 600 600 GECOS field of the UNIX password database).</p><p> 601 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" >nt acl support</a> is set to <code class="constant">false</code>,601 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" target="_top">nt acl support</a> is set to <code class="constant">false</code>, 602 602 the file owner will be shown as the NT user <code class="constant">Everyone</code>, and the permissions will be 603 603 shown as NT <span class="emphasis"><em>Full Control</em></span>. 604 604 </p><p> 605 605 The permissions field is displayed differently for files and directories. Both are discussed next. 606 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 373391"></a>File Permissions</h4></div></div></div><p>606 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613773"></a>File Permissions</h4></div></div></div><p> 607 607 The standard UNIX user/group/world triplet and the corresponding <code class="constant">read, write, 608 608 execute</code> permissions triplets are mapped by Samba into a three-element NT ACL with the … … 622 622 no permissions as having the NT <code class="literal">O</code> bit set. This was chosen, of course, to make it look 623 623 like a zero, meaning zero permissions. More details on the decision behind this action are given below. 624 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 373474"></a>Directory Permissions</h4></div></div></div><p>624 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613867"></a>Directory Permissions</h4></div></div></div><p> 625 625 Directories on an NT NTFS file system have two different sets of permissions. The first set is the ACL set on the 626 626 directory itself, which is usually displayed in the first set of parentheses in the normal <code class="constant">RW</code> … … 633 633 Samba synthesizes these inherited permissions for NT by returning as an NT ACL the UNIX permission mode that a new file 634 634 created by Samba on this share would receive. 635 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 373505"></a>Modifying File or Directory Permissions</h3></div></div></div><p>635 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2613905"></a>Modifying File or Directory Permissions</h3></div></div></div><p> 636 636 Modifying file and directory permissions is as simple as changing the displayed permissions in the dialog box 637 637 and clicking on <span class="guibutton">OK</span>. However, there are limitations that a user needs to be aware of, … … 639 639 be taken into account. 640 640 </p><p> 641 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" >nt acl support</a> is set to <code class="constant">false</code>, any attempt to641 If the parameter <a class="link" href="smb.conf.5.html#NTACLSUPPORT" target="_top">nt acl support</a> is set to <code class="constant">false</code>, any attempt to 642 642 set security permissions will fail with an <span class="errorname">"Access Denied" </span> message. 643 643 </p><p> … … 666 666 component and click on the <span class="guibutton">Remove</span> button or set the component to only have the special 667 667 <code class="constant">Take Ownership</code> permission (displayed as <code class="literal">O</code>) highlighted. 668 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 373645"></a>Interaction with the Standard Samba “<span class="quote">create mask</span>” Parameters</h3></div></div></div><p>There are four parameters that control interaction with the standard Samba <em class="parameter"><code>create mask</code></em> parameters:668 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2614062"></a>Interaction with the Standard Samba “<span class="quote">create mask</span>” Parameters</h3></div></div></div><p>There are four parameters that control interaction with the standard Samba <em class="parameter"><code>create mask</code></em> parameters: 669 669 670 670 671 </p><div class="itemizedlist"><ul type="disc"><li><p><a class="link" href="smb.conf.5.html#SECURITYMASK" >security mask</a></p></li><li><p><a class="link" href="smb.conf.5.html#FORCESECURITYMODE">force security mode</a></p></li><li><p><a class="link" href="smb.conf.5.html#DIRECTORYSECURITYMASK">directory security mask</a></p></li><li><p><a class="link" href="smb.conf.5.html#FORCEDIRECTORYSECURITYMODE">force directory security mode</a></p></li></ul></div><p>671 </p><div class="itemizedlist"><ul type="disc"><li><p><a class="link" href="smb.conf.5.html#SECURITYMASK" target="_top">security mask</a></p></li><li><p><a class="link" href="smb.conf.5.html#FORCESECURITYMODE" target="_top">force security mode</a></p></li><li><p><a class="link" href="smb.conf.5.html#DIRECTORYSECURITYMASK" target="_top">directory security mask</a></p></li><li><p><a class="link" href="smb.conf.5.html#FORCEDIRECTORYSECURITYMODE" target="_top">force directory security mode</a></p></li></ul></div><p> 672 672 673 673 </p><p> … … 676 676 r/w/x triplet set, and then checks the changed permissions for a 677 677 file against the bits set in the 678 <a class="link" href="smb.conf.5.html#SECURITYMASK" >security mask</a> parameter. Any bits that678 <a class="link" href="smb.conf.5.html#SECURITYMASK" target="_top">security mask</a> parameter. Any bits that 679 679 were changed that are not set to <span class="emphasis"><em>1</em></span> in this parameter are left alone 680 680 in the file permissions.</p><p> 681 Essentially, zero bits in the <a class="link" href="smb.conf.5.html#SECURITYMASK" >security mask</a>681 Essentially, zero bits in the <a class="link" href="smb.conf.5.html#SECURITYMASK" target="_top">security mask</a> 682 682 may be treated as a set of bits the user is <span class="emphasis"><em>not</em></span> 683 683 allowed to change, and one bits are those the user is allowed to change. 684 684 </p><p> 685 685 If not explicitly set, this parameter defaults to the same value as 686 the <a class="link" href="smb.conf.5.html#CREATEMASK" >create mask</a> parameter. To allow a user to modify all the686 the <a class="link" href="smb.conf.5.html#CREATEMASK" target="_top">create mask</a> parameter. To allow a user to modify all the 687 687 user/group/world permissions on a file, set this parameter to 0777. 688 688 </p><p> 689 689 Next Samba checks the changed permissions for a file against the bits set in the 690 <a class="link" href="smb.conf.5.html#FORCESECURITYMODE" >force security mode</a> parameter. Any bits690 <a class="link" href="smb.conf.5.html#FORCESECURITYMODE" target="_top">force security mode</a> parameter. Any bits 691 691 that were changed that correspond to bits set to <span class="emphasis"><em>1</em></span> in this parameter 692 692 are forced to be set.</p><p> … … 695 695 has always set to be <span class="emphasis"><em>on</em></span>.</p><p> 696 696 If not explicitly set, this parameter defaults to the same value 697 as the <a class="link" href="smb.conf.5.html#FORCECREATEMODE" >force create mode</a> parameter.697 as the <a class="link" href="smb.conf.5.html#FORCECREATEMODE" target="_top">force create mode</a> parameter. 698 698 To allow a user to modify all the user/group/world permissions on a file 699 699 with no restrictions, set this parameter to 000. The 700 <a class="link" href="smb.conf.5.html#SECURITYMASK" >security mask</a> and <em class="parameter"><code>force700 <a class="link" href="smb.conf.5.html#SECURITYMASK" target="_top">security mask</a> and <em class="parameter"><code>force 701 701 security mode</code></em> parameters are applied to the change 702 702 request in that order.</p><p> … … 707 707 </code></em> parameter instead of <em class="parameter"><code>force security mode 708 708 </code></em>.</p><p> 709 The <a class="link" href="smb.conf.5.html#DIRECTORYSECURITYMASK" >directory security mask</a> parameter709 The <a class="link" href="smb.conf.5.html#DIRECTORYSECURITYMASK" target="_top">directory security mask</a> parameter 710 710 by default is set to the same value as the <em class="parameter"><code>directory mask 711 711 </code></em> parameter and the <em class="parameter"><code>force directory security 712 712 mode</code></em> parameter by default is set to the same value as 713 the <a class="link" href="smb.conf.5.html#FORCEDIRECTORYMODE" >force directory mode</a> parameter.713 the <a class="link" href="smb.conf.5.html#FORCEDIRECTORYMODE" target="_top">force directory mode</a> parameter. 714 714 In this way Samba enforces the permission restrictions that 715 715 an administrator can set on a Samba share, while still allowing users … … 720 720 then set the following parameters in the <code class="filename">smb.conf</code> file in that 721 721 share-specific section: 722 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 373933"></a><em class="parameter"><code>security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id373944"></a><em class="parameter"><code>force security mode = 0</code></em></td></tr><tr><td><a class="indexterm" name="id373956"></a><em class="parameter"><code>directory security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id373967"></a><em class="parameter"><code>force directory security mode = 0</code></em></td></tr></table></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id373980"></a>Interaction with the Standard Samba File Attribute Mapping</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>722 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2614383"></a><em class="parameter"><code>security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614394"></a><em class="parameter"><code>force security mode = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2614406"></a><em class="parameter"><code>directory security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614418"></a><em class="parameter"><code>force directory security mode = 0</code></em></td></tr></table></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2614431"></a>Interaction with the Standard Samba File Attribute Mapping</h3></div></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 723 723 Samba maps some of the DOS attribute bits (such as “<span class="quote">read-only</span>”) 724 724 into the UNIX permissions of a file. This means there can … … 741 741 rather than <span class="guibutton">OK</span> to ensure that your changes 742 742 are not overridden. 743 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 374044"></a>Windows NT/200X ACLs and POSIX ACLs Limitations</h3></div></div></div><p>743 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2614504"></a>Windows NT/200X ACLs and POSIX ACLs Limitations</h3></div></div></div><p> 744 744 Windows administrators are familiar with simple ACL controls, and they typically 745 745 consider that UNIX user/group/other (ugo) permissions are inadequate and not … … 769 769 that permit normal ugo and ACLs functionality to be overrided. This further complicates 770 770 the way in which Windows ACLs must be implemented. 771 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 374088"></a>UNIX POSIX ACL Overview</h4></div></div></div><p>771 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2614562"></a>UNIX POSIX ACL Overview</h4></div></div></div><p> 772 772 In examining POSIX ACLs we must consider the manner in which they operate for 773 773 both files and directories. File ACLs have the following significance: … … 798 798 default:other:--- <-- inherited permissions for everyone (other) 799 799 </pre><p> 800 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 374129"></a>Mapping of Windows File ACLs to UNIX POSIX ACLs</h4></div></div></div><p>800 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2614623"></a>Mapping of Windows File ACLs to UNIX POSIX ACLs</h4></div></div></div><p> 801 801 Microsoft Windows NT4/200X ACLs must of necessity be mapped to POSIX ACLs. 802 802 The mappings for file permissions are shown in <a class="link" href="AccessControls.html#fdsacls" title="Table 16.5. How Windows File ACLs Map to UNIX POSIX File ACLs">How … … 817 817 The Windows administrator is more restricted in that it is not possible from within 818 818 Windows Explorer to remove read permission for the file owner. 819 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id 374386"></a>Mapping of Windows Directory ACLs to UNIX POSIX ACLs</h4></div></div></div><p>819 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2614893"></a>Mapping of Windows Directory ACLs to UNIX POSIX ACLs</h4></div></div></div><p> 820 820 Interesting things happen in the mapping of UNIX POSIX directory permissions and 821 821 UNIX POSIX ACLs to Windows ACEs (Access Control Entries, the discrete components of … … 825 825 there are some notable exceptions and a few peculiarities that the astute administrator 826 826 will want to take into account in the setting up of directory permissions. 827 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id 374405"></a>Common Errors</h2></div></div></div><p>827 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2614917"></a>Common Errors</h2></div></div></div><p> 828 828 File, directory, and share access problems are common topics on the mailing list. The following 829 829 are examples recently taken from the mailing list. 830 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 374415"></a>Users Cannot Write to a Public Share</h3></div></div></div><p>830 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2614928"></a>Users Cannot Write to a Public Share</h3></div></div></div><p> 831 831 The following complaint has frequently been voiced on the Samba mailing list: 832 832 “<span class="quote"> … … 888 888 If the user that must have write permission in the directory is not a member of the group 889 889 <span class="emphasis"><em>engr</em></span> set in the <code class="filename">smb.conf</code> entry for the share: 890 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 374707"></a><em class="parameter"><code>force group = engr</code></em></td></tr></table><p>891 </p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 374722"></a>File Operations Done as <span class="emphasis"><em>root</em></span> with <span class="emphasis"><em>force user</em></span> Set</h3></div></div></div><p>892 When you have a user in <a class="link" href="smb.conf.5.html#ADMINUSERS" >admin users</a>, Samba will always do file operations for893 this user as <span class="emphasis"><em>root</em></span>, even if <a class="link" href="smb.conf.5.html#FORCEUSER" >force user</a> has been set.894 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id 374766"></a>MS Word with Samba Changes Owner of File</h3></div></div></div><p>890 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2615235"></a><em class="parameter"><code>force group = engr</code></em></td></tr></table><p> 891 </p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2615251"></a>File Operations Done as <span class="emphasis"><em>root</em></span> with <span class="emphasis"><em>force user</em></span> Set</h3></div></div></div><p> 892 When you have a user in <a class="link" href="smb.conf.5.html#ADMINUSERS" target="_top">admin users</a>, Samba will always do file operations for 893 this user as <span class="emphasis"><em>root</em></span>, even if <a class="link" href="smb.conf.5.html#FORCEUSER" target="_top">force user</a> has been set. 894 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2615297"></a>MS Word with Samba Changes Owner of File</h3></div></div></div><p> 895 895 <span class="emphasis"><em>Question:</em></span> “<span class="quote">When user B saves a word document that is owned by user A, 896 896 the updated file is now owned by user B. Why is Samba doing this? How do I fix this?</span>” … … 907 907 be created with the group that owns the directory. In <code class="filename">smb.conf</code> share declaration section set: 908 908 </p><p> 909 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id 374826"></a><em class="parameter"><code>force create mode = 0660</code></em></td></tr><tr><td><a class="indexterm" name="id374838"></a><em class="parameter"><code>force directory mode = 0770</code></em></td></tr></table><p>909 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2615366"></a><em class="parameter"><code>force create mode = 0660</code></em></td></tr><tr><td><a class="indexterm" name="id2615378"></a><em class="parameter"><code>force directory mode = 0770</code></em></td></tr></table><p> 910 910 </p><p> 911 911 These two settings will ensure that all directories and files that get created in the share will be readable/writable by the
Note:
See TracChangeset
for help on using the changeset viewer.