- 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/AccessControls.html
r218 r274 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#id2610520">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="AccessControls.html#id2610715">File System Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2610729">MS Windows NTFS Comparison with UNIX File Systems</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611066">Managing Directories</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611189">File and Directory Access Control</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2611855">Share Definition Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2611888">User- and Group-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612262">File and Directory Permissions-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612600">Miscellaneous Controls</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2612937">Access Controls on Shares</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613086">Share Permissions Management</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2613432">MS Windows Access Control Lists and UNIX Interoperability</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613439">Managing UNIX Permissions Using NT Security Dialogs</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613486">Viewing File Security on a Samba Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613556">Viewing File Ownership</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613700">Viewing File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613915">Modifying File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614073">Interaction with the Standard Samba create mask Parameters</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614442">Interaction with the Standard Samba File Attribute Mapping</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614515">Windows NT/200X ACLs and POSIX ACLs Limitations</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2614928">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2614939">Users Cannot Write to a Public Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615262">File Operations Done as root with force user Set</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615308">MS Word with Samba Changes Owner of File</a></span></dt></dl></dd></dl></div><p>2 <a class="indexterm" name="id2610 350"></a>3 <a class="indexterm" name="id2610 357"></a>4 <a class="indexterm" name="id2610 364"></a>5 <a class="indexterm" name="id2610 371"></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.3.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#id2610573">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="AccessControls.html#id2610759">File System Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2610774">MS Windows NTFS Comparison with UNIX File Systems</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611116">Managing Directories</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2611240">File and Directory Access Control</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2611906">Share Definition Access Controls</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2611939">User- and Group-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612307">File and Directory Permissions-Based Controls</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2612644">Miscellaneous Controls</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2612982">Access Controls on Shares</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613130">Share Permissions Management</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2613477">MS Windows Access Control Lists and UNIX Interoperability</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2613483">Managing UNIX Permissions Using NT Security Dialogs</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613530">Viewing File Security on a Samba Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613601">Viewing File Ownership</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613744">Viewing File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2613960">Modifying File or Directory Permissions</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614117">Interaction with the Standard Samba create mask Parameters</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614486">Interaction with the Standard Samba File Attribute Mapping</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2614559">Windows NT/200X ACLs and POSIX ACLs Limitations</a></span></dt></dl></dd><dt><span class="sect1"><a href="AccessControls.html#id2614978">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="AccessControls.html#id2614989">Users Cannot Write to a Public Share</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615312">File Operations Done as root with force user Set</a></span></dt><dt><span class="sect2"><a href="AccessControls.html#id2615358">MS Word with Samba Changes Owner of File</a></span></dt></dl></dd></dl></div><p> 2 <a class="indexterm" name="id2610403"></a> 3 <a class="indexterm" name="id2610410"></a> 4 <a class="indexterm" name="id2610417"></a> 5 <a class="indexterm" name="id2610424"></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="id2610 387"></a>12 <a class="indexterm" name="id2610 394"></a>11 <a class="indexterm" name="id2610440"></a> 12 <a class="indexterm" name="id2610448"></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="id26104 08"></a>18 <a class="indexterm" name="id26104 15"></a>19 <a class="indexterm" name="id26104 22"></a>20 <a class="indexterm" name="id26104 29"></a>17 <a class="indexterm" name="id2610462"></a> 18 <a class="indexterm" name="id2610469"></a> 19 <a class="indexterm" name="id2610476"></a> 20 <a class="indexterm" name="id2610483"></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="id26104 42"></a>26 <a class="indexterm" name="id2610 449"></a>27 <a class="indexterm" name="id2610 458"></a>28 <a class="indexterm" name="id2610 465"></a>25 <a class="indexterm" name="id2610495"></a> 26 <a class="indexterm" name="id2610502"></a> 27 <a class="indexterm" name="id2610512"></a> 28 <a class="indexterm" name="id2610518"></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="id2610 482"></a>35 <a class="indexterm" name="id2610536"></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="id2610 497"></a>41 <a class="indexterm" name="id26105 04"></a>40 <a class="indexterm" name="id2610550"></a> 41 <a class="indexterm" name="id2610557"></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="id26105 20"></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="id2610573"></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="id26105 40"></a>51 <a class="indexterm" name="id2610594"></a> 52 52 <span class="emphasis"><em>UNIX File and Directory Permissions</em></span> 53 53 </p><p> 54 <a class="indexterm" name="id2610 557"></a>55 <a class="indexterm" name="id2610 564"></a>56 <a class="indexterm" name="id2610 571"></a>54 <a class="indexterm" name="id2610610"></a> 55 <a class="indexterm" name="id2610617"></a> 56 <a class="indexterm" name="id2610624"></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="id26106 08"></a>67 <a class="indexterm" name="id2610652"></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="id26106 39"></a>77 </p><p> 78 <a class="indexterm" name="id26106 52"></a>76 <a class="indexterm" name="id2610684"></a> 77 </p><p> 78 <a class="indexterm" name="id2610697"></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="id2610 670"></a>86 <a class="indexterm" name="id2610 679"></a>85 <a class="indexterm" name="id2610714"></a> 86 <a class="indexterm" name="id2610724"></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="id2610 695"></a>89 <a class="indexterm" name="id2610740"></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="id26107 15"></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="id2610759"></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="id26107 29"></a>MS Windows NTFS Comparison with UNIX File Systems</h3></div></div></div><p>103 <a class="indexterm" name="id26107 38"></a>104 <a class="indexterm" name="id26107 45"></a>105 <a class="indexterm" name="id26107 51"></a>106 <a class="indexterm" name="id2610 761"></a>102 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2610774"></a>MS Windows NTFS Comparison with UNIX File Systems</h3></div></div></div><p> 103 <a class="indexterm" name="id2610783"></a> 104 <a class="indexterm" name="id2610789"></a> 105 <a class="indexterm" name="id2610796"></a> 106 <a class="indexterm" name="id2610805"></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="id2610 796"></a>117 <a class="indexterm" name="id2610846"></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="id26108 41"></a>127 <a class="indexterm" name="id26108 48"></a>126 <a class="indexterm" name="id2610891"></a> 127 <a class="indexterm" name="id2610898"></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="id26109 12"></a>154 <a class="indexterm" name="id2610962"></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="id26109 40"></a>158 <a class="indexterm" name="id2610990"></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="id261 0977"></a>165 <a class="indexterm" name="id2611027"></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="id26110 07"></a>172 <a class="indexterm" name="id26110 16"></a>173 <a class="indexterm" name="id26110 25"></a>171 <a class="indexterm" name="id2611057"></a> 172 <a class="indexterm" name="id2611067"></a> 173 <a class="indexterm" name="id2611076"></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="id2611 066"></a>Managing Directories</h3></div></div></div><p>187 <a class="indexterm" name="id2611 074"></a>188 <a class="indexterm" name="id2611 081"></a>189 <a class="indexterm" name="id2611 087"></a>186 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2611116"></a>Managing Directories</h3></div></div></div><p> 187 <a class="indexterm" name="id2611124"></a> 188 <a class="indexterm" name="id2611131"></a> 189 <a class="indexterm" name="id2611138"></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="id2611 189"></a>File and Directory Access Control</h3></div></div></div><p>194 <a class="indexterm" name="id2611 197"></a>195 <a class="indexterm" name="id26112 07"></a>196 <a class="indexterm" name="id26112 13"></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="id2611240"></a>File and Directory Access Control</h3></div></div></div><p> 194 <a class="indexterm" name="id2611248"></a> 195 <a class="indexterm" name="id2611257"></a> 196 <a class="indexterm" name="id2611264"></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="id2611 355"></a>230 <a class="indexterm" name="id2611 362"></a>231 <a class="indexterm" name="id2611 369"></a>232 <a class="indexterm" name="id2611 375"></a>233 <a class="indexterm" name="id2611 382"></a>234 <a class="indexterm" name="id2611 389"></a>229 <a class="indexterm" name="id2611406"></a> 230 <a class="indexterm" name="id2611412"></a> 231 <a class="indexterm" name="id2611419"></a> 232 <a class="indexterm" name="id2611426"></a> 233 <a class="indexterm" name="id2611433"></a> 234 <a class="indexterm" name="id2611440"></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="id26114 19"></a>242 <a class="indexterm" name="id26114 25"></a>243 <a class="indexterm" name="id26114 32"></a>244 <a class="indexterm" name="id26114 39"></a>241 <a class="indexterm" name="id2611469"></a> 242 <a class="indexterm" name="id2611476"></a> 243 <a class="indexterm" name="id2611483"></a> 244 <a class="indexterm" name="id2611490"></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="id2611 452"></a>249 <a class="indexterm" name="id2611 458"></a>250 <a class="indexterm" name="id2611 465"></a>251 <a class="indexterm" name="id2611 472"></a>252 <a class="indexterm" name="id2611 479"></a>248 <a class="indexterm" name="id2611502"></a> 249 <a class="indexterm" name="id2611509"></a> 250 <a class="indexterm" name="id2611516"></a> 251 <a class="indexterm" name="id2611523"></a> 252 <a class="indexterm" name="id2611529"></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="id2611 498"></a>258 <a class="indexterm" name="id26115 04"></a>259 <a class="indexterm" name="id26115 11"></a>260 <a class="indexterm" name="id26115 18"></a>257 <a class="indexterm" name="id2611548"></a> 258 <a class="indexterm" name="id2611555"></a> 259 <a class="indexterm" name="id2611562"></a> 260 <a class="indexterm" name="id2611568"></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="id26115 39"></a>266 <a class="indexterm" name="id26115 46"></a>267 <a class="indexterm" name="id2611 553"></a>268 <a class="indexterm" name="id2611 560"></a>269 <a class="indexterm" name="id2611 569"></a>265 <a class="indexterm" name="id2611590"></a> 266 <a class="indexterm" name="id2611597"></a> 267 <a class="indexterm" name="id2611604"></a> 268 <a class="indexterm" name="id2611611"></a> 269 <a class="indexterm" name="id2611620"></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="id26116 01"></a>Protecting Directories and Files from Deletion</h4></div></div></div><p>280 <a class="indexterm" name="id26116 10"></a>281 <a class="indexterm" name="id26116 17"></a>282 <a class="indexterm" name="id26116 24"></a>283 <a class="indexterm" name="id26116 30"></a>279 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2611652"></a>Protecting Directories and Files from Deletion</h4></div></div></div><p> 280 <a class="indexterm" name="id2611660"></a> 281 <a class="indexterm" name="id2611667"></a> 282 <a class="indexterm" name="id2611674"></a> 283 <a class="indexterm" name="id2611681"></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="id2611 652"></a>292 <a class="indexterm" name="id2611 659"></a>293 <a class="indexterm" name="id2611 666"></a>291 <a class="indexterm" name="id2611702"></a> 292 <a class="indexterm" name="id2611710"></a> 293 <a class="indexterm" name="id2611716"></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="id2611 681"></a>299 <a class="indexterm" name="id2611 688"></a>300 <a class="indexterm" name="id2611 695"></a>301 <a class="indexterm" name="id26117 02"></a>298 <a class="indexterm" name="id2611731"></a> 299 <a class="indexterm" name="id2611738"></a> 300 <a class="indexterm" name="id2611745"></a> 301 <a class="indexterm" name="id2611752"></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="id26117 23"></a>309 <a class="indexterm" name="id26117 30"></a>310 <a class="indexterm" name="id26117 37"></a>311 <a class="indexterm" name="id26117 44"></a>308 <a class="indexterm" name="id2611774"></a> 309 <a class="indexterm" name="id2611781"></a> 310 <a class="indexterm" name="id2611788"></a> 311 <a class="indexterm" name="id2611794"></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="id2611 782"></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="id2611833"></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="id2611 855"></a>Share Definition Access Controls</h2></div></div></div><p>344 <a class="indexterm" name="id2611 863"></a>343 </p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2611906"></a>Share Definition Access Controls</h2></div></div></div><p> 344 <a class="indexterm" name="id2611914"></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="id2611 888"></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="id2611939"></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 … … 386 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="id2612 262"></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="id2612307"></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 … … 417 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="id26126 00"></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="id2612644"></a>Miscellaneous Controls</h3></div></div></div><p> 420 420 The parameters 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 … … 450 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="id26129 37"></a>Access Controls on Shares</h2></div></div></div><p>453 <a class="indexterm" name="id26129 45"></a>454 <a class="indexterm" name="id26129 52"></a>455 <a class="indexterm" name="id261 2959"></a>456 <a class="indexterm" name="id261 2966"></a>457 <a class="indexterm" name="id261 2973"></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="id2612982"></a>Access Controls on Shares</h2></div></div></div><p> 453 <a class="indexterm" name="id2612990"></a> 454 <a class="indexterm" name="id2612996"></a> 455 <a class="indexterm" name="id2613004"></a> 456 <a class="indexterm" name="id2613011"></a> 457 <a class="indexterm" name="id2613018"></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="id261 2997"></a>465 <a class="indexterm" name="id26130 04"></a>466 <a class="indexterm" name="id26130 10"></a>464 <a class="indexterm" name="id2613041"></a> 465 <a class="indexterm" name="id2613048"></a> 466 <a class="indexterm" name="id2613054"></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="id26130 26"></a>473 <a class="indexterm" name="id26130 33"></a>474 <a class="indexterm" name="id26130 40"></a>475 <a class="indexterm" name="id26130 47"></a>472 <a class="indexterm" name="id2613071"></a> 473 <a class="indexterm" name="id2613078"></a> 474 <a class="indexterm" name="id2613085"></a> 475 <a class="indexterm" name="id2613091"></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="id2613 086"></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="id2613130"></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="id2613 097"></a>Windows NT4 Workstation/Server</h4></div></div></div><p>484 <a class="indexterm" name="id26131 05"></a>485 <a class="indexterm" name="id26131 12"></a>486 <a class="indexterm" name="id26131 19"></a>487 <a class="indexterm" name="id26131 26"></a>483 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613141"></a>Windows NT4 Workstation/Server</h4></div></div></div><p> 484 <a class="indexterm" name="id2613149"></a> 485 <a class="indexterm" name="id2613156"></a> 486 <a class="indexterm" name="id2613163"></a> 487 <a class="indexterm" name="id2613170"></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="id26131 47"></a><p class="title"><b>Procedure 16.2. Instructions</b></p><ol type="1"><li><p>492 </p><div class="procedure"><a name="id2613191"></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="id26132 02"></a>Windows 200x/XP</h4></div></div></div><p>500 <a class="indexterm" name="id26132 10"></a>501 <a class="indexterm" name="id26132 17"></a>502 <a class="indexterm" name="id26132 24"></a>503 <a class="indexterm" name="id26132 31"></a>499 </p></li></ol></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2613246"></a>Windows 200x/XP</h4></div></div></div><p> 500 <a class="indexterm" name="id2613254"></a> 501 <a class="indexterm" name="id2613261"></a> 502 <a class="indexterm" name="id2613268"></a> 503 <a class="indexterm" name="id2613275"></a> 504 504 On <span class="application">MS Windows NT4/200x/XP</span> systems, ACLs on the share itself are set using 505 505 tools like the MS Explorer. For example, in Windows 200x, right-click on the shared folder, … … 507 507 Windows NT4/200x permissions allow the group "Everyone" full control on the share. 508 508 </p><p> 509 <a class="indexterm" name="id2613 264"></a>510 <a class="indexterm" name="id2613 270"></a>511 <a class="indexterm" name="id2613 277"></a>509 <a class="indexterm" name="id2613308"></a> 510 <a class="indexterm" name="id2613315"></a> 511 <a class="indexterm" name="id2613321"></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 can be accessed via <span class="guimenu">Control Panel -> 514 514 Administrative Tools -> Computer Management</span>. 515 </p><div class="procedure"><a name="id26133 01"></a><p class="title"><b>Procedure 16.3. Instructions</b></p><ol type="1"><li><p>515 </p><div class="procedure"><a name="id2613345"></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="id2613 382"></a>526 <a class="indexterm" name="id2613426"></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="id26134 32"></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="id2613439"></a>Managing UNIX Permissions Using NT Security Dialogs</h3></div></div></div><p>538 <a class="indexterm" name="id26134 47"></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="id2613477"></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="id2613483"></a>Managing UNIX Permissions Using NT Security Dialogs</h3></div></div></div><p> 538 <a class="indexterm" name="id2613492"></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="id2613 486"></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="id2613530"></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="id2613 556"></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="id2613601"></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: … … 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="id26136 30"></a>577 <a class="indexterm" name="id2613675"></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="id2613 659"></a>586 <a class="indexterm" name="id2613 666"></a>587 <a class="indexterm" name="id2613 673"></a>585 <a class="indexterm" name="id2613704"></a> 586 <a class="indexterm" name="id2613710"></a> 587 <a class="indexterm" name="id2613717"></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="id26137 00"></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="id2613744"></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: … … 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="id2613 784"></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="id2613828"></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="id2613 878"></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="id2613922"></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="id26139 15"></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="id2613960"></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, … … 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="id2614 073"></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="id2614117"></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 … … 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="id2614 393"></a><em class="parameter"><code>security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614404"></a><em class="parameter"><code>force security mode = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2614416"></a><em class="parameter"><code>directory security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614428"></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="id2614442"></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="id2614438"></a><em class="parameter"><code>security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614449"></a><em class="parameter"><code>force security mode = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2614461"></a><em class="parameter"><code>directory security mask = 0777</code></em></td></tr><tr><td><a class="indexterm" name="id2614473"></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="id2614486"></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="id26145 15"></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="id2614559"></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="id2614 573"></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="id2614623"></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="id26146 34"></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="id2614684"></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="id26149 03"></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="id2614954"></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="id26149 28"></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="id2614978"></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="id26149 39"></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="id2614989"></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="id26152 46"></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="id2615 262"></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>890 </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2615296"></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="id2615312"></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 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 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="id26153 08"></a>MS Word with Samba Changes Owner of File</h3></div></div></div><p>894 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2615358"></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="id2615 377"></a><em class="parameter"><code>force create mode = 0660</code></em></td></tr><tr><td><a class="indexterm" name="id2615389"></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="id2615427"></a><em class="parameter"><code>force create mode = 0660</code></em></td></tr><tr><td><a class="indexterm" name="id2615439"></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.