diff options
Diffstat (limited to 'docs/docbook/projdoc/AccessControls.xml')
-rw-r--r-- | docs/docbook/projdoc/AccessControls.xml | 594 |
1 files changed, 306 insertions, 288 deletions
diff --git a/docs/docbook/projdoc/AccessControls.xml b/docs/docbook/projdoc/AccessControls.xml index 344e51e5c0..72348d44cd 100644 --- a/docs/docbook/projdoc/AccessControls.xml +++ b/docs/docbook/projdoc/AccessControls.xml @@ -7,12 +7,12 @@ </chapterinfo> <title>File, Directory and Share Access Controls</title> -<indexterm><primary>ACLs</primary></indexterm> <para> +<indexterm><primary>ACLs</primary></indexterm> Advanced MS Windows users are frequently perplexed when file, directory and share manipulation of resources shared via Samba do not behave in the manner they might expect. MS Windows network administrators are often confused regarding network access controls and how to -provide users with the access they need while protecting resources from unauthorised access. +provide users with the access they need while protecting resources from unauthorized access. </para> <para> @@ -23,17 +23,19 @@ and directory access permissions. <para> The problem lies in the differences in how file and directory permissions and controls work -between the two environments. This difference is one that Samba can not completely hide, even +between the two environments. This difference is one that Samba cannot completely hide, even though it does try to bridge the chasm to a degree. </para> -<indexterm><primary>Extended Attributes</primary></indexterm> <para> +<indexterm><primary>Extended Attributes</primary></indexterm> +<indexterm><primary>ACLs</primary><secondary>POSIX</secondary></indexterm> + POSIX Access Control List technology has been available (along with Extended Attributes) for UNIX for many years, yet there is little evidence today of any significant use. This explains to some extent the slow adoption of ACLs into commercial Linux products. MS Windows -administrators are astounded at this given that ACLs were a foundational capability of the now -decade old MS Windows NT operating system. +administrators are astounded at this, given that ACLs were a foundational capability of the now +decade-old MS Windows NT operating system. </para> <para> @@ -44,9 +46,9 @@ for delivering the best environment for MS Windows desktop users. <para> This is an opportune point to mention that Samba was created to provide a means of interoperability -and interchange of data between differing operating environments. Samba has no intent change +and interchange of data between differing operating environments. Samba has no intent to change UNIX/Linux into a platform like MS Windows. Instead the purpose was and is to provide a sufficient -level of exchange of data between the two environments. What is available today extends well +level of exchange of data between the two environments. What is available today extends well beyond early plans and expectations, yet the gap continues to shrink. </para> @@ -61,11 +63,12 @@ beyond early plans and expectations, yet the gap continues to shrink. <itemizedlist> <title>Samba Access Control Facilities</title> <listitem><para> + <indexterm><primary>permissions</primary><secondary>UNIX file and directory</secondary></indexterm> <emphasis>UNIX File and Directory Permissions</emphasis> </para> <para> - Samba honours and implements UNIX file system access controls. Users + Samba honors and implements UNIX file system access controls. Users who access a Samba server will do so as a particular MS Windows user. This information is passed to the Samba server as part of the logon or connection setup process. Samba uses this user identity to validate @@ -80,10 +83,10 @@ beyond early plans and expectations, yet the gap continues to shrink. </para> <para> - In configuring share settings and controls in the &smb.conf; file - the network administrator can exercise over-rides to native file - system permissions and behaviours. This can be handy and convenient - to affect behaviour that is more like what MS Windows NT users expect + In configuring share settings and controls in the &smb.conf; file, + the network administrator can exercise overrides to native file + system permissions and behaviors. This can be handy and convenient + to effect behavior that is more like what MS Windows NT users expect but it is seldom the <emphasis>best</emphasis> way to achieve this. The basic options and techniques are described herein. </para> @@ -91,27 +94,30 @@ beyond early plans and expectations, yet the gap continues to shrink. <listitem><para> <emphasis>Samba Share ACLs</emphasis> + <indexterm><primary>ACLs</primary><secondary>share</secondary></indexterm> </para> <para> Just like it is possible in MS Windows NT to set ACLs on shares themselves, so it is possible to do this in Samba. - Very few people make use of this facility, yet it remains on of the + Few people make use of this facility, yet it remains on of the easiest ways to affect access controls (restrictions) and can often do so with minimum invasiveness compared with other methods. </para> </listitem> <listitem><para> + <indexterm><primary>ACLs</primary><secondary>POSIX</secondary></indexterm> + <indexterm><primary>ACLs</primary><secondary>Windows</secondary></indexterm> <emphasis>MS Windows ACLs through UNIX POSIX ACLs</emphasis> </para> <para> - The use of POSIX ACLs on UNIX/Linux is possible ONLY if the underlying + The use of POSIX ACLs on UNIX/Linux is possible only if the underlying operating system supports them. If not, then this option will not be available to you. Current UNIX technology platforms have native support - for POSIX ACLs. There are patches for the Linux kernel that provide - this also. Sadly, few Linux platforms ship today with native ACLs and + for POSIX ACLs. There are patches for the Linux kernel that also provide + this. Sadly, few Linux platforms ship today with native ACLs and Extended Attributes enabled. This chapter has pertinent information for users of platforms that support them. </para> @@ -124,43 +130,50 @@ beyond early plans and expectations, yet the gap continues to shrink. <title>File System Access Controls</title> <para> -Perhaps the most important recognition to be made is the simple fact that MS Windows NT4 / 200x / XP +Perhaps the most important recognition to be made is the simple fact that MS Windows NT4/200x/XP implement a totally divergent file system technology from what is provided in the UNIX operating system -environment. Firstly we should consider what the most significant differences are, then we shall look +environment. First we consider what the most significant differences are, then we look at how Samba helps to bridge the differences. </para> -<indexterm><primary>NTFS</primary></indexterm> -<indexterm><primary>File System</primary></indexterm> <sect2> <title>MS Windows NTFS Comparison with UNIX File Systems</title> <para> +<indexterm><primary>NTFS</primary></indexterm> +<indexterm><primary>File System</primary></indexterm> +<indexterm><primary>File System</primary><secondary>UNIX</secondary></indexterm> +<indexterm><primary>File System</primary><secondary>Windows</secondary></indexterm> + Samba operates on top of the UNIX file system. This means it is subject to UNIX file system conventions and permissions. It also means that if the MS Windows networking environment requires file system - behaviour that differs from unix file system behaviour then somehow Samba is responsible for emulating + behavior that differs from UNIX file system behavior then somehow Samba is responsible for emulating that in a transparent and consistent manner. </para> <para> - It is good news that Samba does this to a very large extent and on top of that provides a high degree - of optional configuration to over-ride the default behaviour. We will look at some of these over-rides, - but for the greater part we will stay within the bounds of default behaviour. Those wishing to explore - to depths of control ability should review the &smb.conf; man page. + It is good news that Samba does this to a large extent and on top of that provides a high degree + of optional configuration to override the default behavior. We look at some of these over-rides, + but for the greater part we will stay within the bounds of default behavior. Those wishing to explore + the depths of control ability should review the &smb.conf; man page. + </para> + + <para>The following compares file system features for UNIX with those of Microsoft Windows NT/200x: + <indexterm><primary>File System</primary><secondary>feature comparison</secondary></indexterm> + </para> <variablelist> - <title>File System Feature Comparison</title> <varlistentry> <term>Name Space</term> <listitem> <para> - MS Windows NT4 / 200x/ XP files names may be up to 254 characters long, UNIX file names - may be 1023 characters long. In MS Windows file extensions indicate particular file types, + MS Windows NT4/200x/XP files names may be up to 254 characters long, and UNIX file names + may be 1023 characters long. In MS Windows, file extensions indicate particular file types, in UNIX this is not so rigorously observed as all names are considered arbitrary. </para> <para> - What MS Windows calls a Folder, UNIX calls a directory. + What MS Windows calls a folder, UNIX calls a directory. </para> </listitem> </varlistentry> @@ -169,28 +182,35 @@ at how Samba helps to bridge the differences. <term>Case Sensitivity</term> <listitem> <para> - <indexterm><primary>8.3</primary><secondary>file names</secondary></indexterm> - MS Windows file names are generally upper case if made up of 8.3 (ie: 8 character file name - and 3 character extension. If longer than 8.3 file names are Case Preserving, and Case - Insensitive. + <indexterm><primary>8.3 file names</primary></indexterm> + <indexterm><primary>File System</primary><secondary>case sensitivity</secondary></indexterm> + MS Windows file names are generally upper case if made up of 8.3 (8 character file name + and 3 character extension. File names that are longer than 8.3 are case preserving and case + insensitive. </para> + <para> UNIX file and directory names are case sensitive and case preserving. Samba implements the - MS Windows file name behaviour, but it does so as a user application. The UNIX file system + MS Windows file name behavior, but it does so as a user application. The UNIX file system provides no mechanism to perform case insensitive file name lookups. MS Windows does this by default. This means that Samba has to carry the processing overhead to provide features - that are NOT native to the UNIX operating system environment. + that are not native to the UNIX operating system environment. </para> <para> - Consider the following, all are unique UNIX names but one single MS Windows file name: - <computeroutput> + Consider the following. All are unique UNIX names but one single MS Windows file name: + <screen> MYFILE.TXT MyFile.txt myfile.txt - </computeroutput> - So clearly, In an MS Windows file name space these three files CAN NOT co-exist! But in UNIX - they can. So what should Samba do if all three are present? Answer, the one that is lexically - first will be accessible to MS Windows users, the others are invisible and unaccessible - any + </screen></para> + + <para> + So clearly, in an MS Windows file name space these three files cannot co-exist, but in UNIX + they can. + </para> + <para> + So what should Samba do if all three are present? That which is lexically first will be + accessible to MS Windows users, the others are invisible and unaccessible &smbmdash; any other solution would be suicidal. </para> </listitem> @@ -199,9 +219,11 @@ at how Samba helps to bridge the differences. <varlistentry> <term>Directory Separators</term> <listitem> + <para> - MS Windows and DOS uses the back-slash '\' as a directory delimiter, UNIX uses the forward-slash '/' - as it's directory delimiter. This is transparently handled by Samba. + <indexterm><primary>Directory Separators</primary></indexterm> + MS Windows and DOS uses the backslash <constant>\</constant> as a directory delimiter, and UNIX uses + the forward-slash <constant>/</constant> as its directory delimiter. This is handled transparently by Samba. </para> </listitem> </varlistentry> @@ -210,11 +232,12 @@ at how Samba helps to bridge the differences. <term>Drive Identification</term> <listitem> <para> + <indexterm><primary>Drive Identification</primary></indexterm> MS Windows products support a notion of drive letters, like <command>C:</command> to represent - disk partitions. UNIX has NO concept if separate identifiers for file partitions since each - such file system is <filename>mounted</filename> to become part of the over-all directory tree. - The UNIX directory tree begins at '/', just like the root of a DOS drive is specified like - <command>C:\</command>. + disk partitions. UNIX has no concept of separate identifiers for file partitions, each + such file system is mounted to become part of the overall directory tree. + The UNIX directory tree begins at <constant>/</constant> just like the root of a DOS drive is specified as + <constant>C:\</constant>. </para> </listitem> </varlistentry> @@ -223,9 +246,10 @@ at how Samba helps to bridge the differences. <term>File Naming Conventions</term> <listitem> <para> - MS Windows generally never experiences file names that begin with a '.', while in UNIX these - are commonly found in a user's home directory. Files that begin with a '.' are typically - either start up files for various UNIX applications, or they may be files that contain + <indexterm><primary>File Naming Conventions</primary></indexterm> + MS Windows generally never experiences file names that begin with a dot (<constant>.</constant>) while in UNIX these + are commonly found in a user's home directory. Files that begin with a dot (<constant>.</constant>) are typically + either start-up files for various UNIX applications, or they may be files that contain start-up configuration data. </para> </listitem> @@ -238,15 +262,14 @@ at how Samba helps to bridge the differences. <indexterm><primary>Links</primary><secondary>hard</secondary></indexterm> <indexterm><primary>Links</primary><secondary>soft</secondary></indexterm> <indexterm><primary>Short-Cuts</primary></indexterm> - - MS Windows make use of "links and Short-Cuts" that are actually special types of files that will + MS Windows make use of <quote>links and short-cuts</quote> that are actually special types of files that will redirect an attempt to execute the file to the real location of the file. UNIX knows of file and directory links, but they are entirely different from what MS Windows users are used to. </para> <para> - Symbolic links are files in UNIX that contain the actual location of the data (file OR directory). An + Symbolic links are files in UNIX that contain the actual location of the data (file or directory). An operation (like read or write) will operate directly on the file referenced. Symbolic links are also - referred to as 'soft links'. A hard link is something that MS Windows is NOT familiar with. It allows + referred to as <quote>soft links.</quote> A hard link is something that MS Windows is not familiar with. It allows one physical file to be known simultaneously by more than one file name. </para> </listitem> @@ -256,7 +279,7 @@ at how Samba helps to bridge the differences. <para> There are many other subtle differences that may cause the MS Windows administrator some temporary discomfort in the process of becoming familiar with UNIX/Linux. These are best left for a text that is dedicated to the - purpose of UNIX/Linux training/education. + purpose of UNIX/Linux training and education. </para> </sect2> @@ -265,9 +288,9 @@ at how Samba helps to bridge the differences. <title>Managing Directories</title> <para> - There are three basic operations for managing directories, <command>create, delete, rename</command>. + There are three basic operations for managing directories: <command>create, delete, rename</command>. <table frame="all"> - <title>Managing directories with unix and windows</title> + <title>Managing Directories with UNIX and Windows</title> <tgroup align="center" cols="3"> <thead> <row><entry>Action</entry><entry>MS Windows Command</entry><entry>UNIX Command</entry></row> @@ -287,7 +310,9 @@ at how Samba helps to bridge the differences. <sect2> <title>File and Directory Access Control</title> + <para> + <indexterm><primary>ACLs</primary><secondary>File System</secondary></indexterm> The network administrator is strongly advised to read foundational training manuals and reference materials regarding file and directory permissions maintenance. Much can be achieved with the basic UNIX permissions without having to resort to more complex facilities like POSIX Access Control Lists (ACLs) or Extended @@ -295,9 +320,8 @@ at how Samba helps to bridge the differences. </para> <para> - UNIX/Linux file and directory access permissions involves setting three (3) primary sets of data and one (1) control set. - A UNIX file listing looks as follows:- - + UNIX/Linux file and directory access permissions involves setting three primary sets of data and one control set. + A UNIX file listing looks as follows: <screen> &prompt;<userinput>ls -la</userinput> total 632 @@ -322,20 +346,20 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 </para> <para> - An overview of the permissions field can be found in <link linkend="access1">the image below</link>. + An overview of the permissions field can be found in <link linkend="access1"/>. </para> - <image scale="40"><imagedescription>Overview of unix permissions field</imagedescription><imagefile>access1</imagefile></image> + <image id="access1" scale="40"><imagedescription>Overview of UNIX permissions field.</imagedescription><imagefile>access1</imagefile></image> <para> - Any bit flag may be unset. An unset bit flag is the equivalent of 'Can NOT' and is represented as a '-' character. + Any bit flag may be unset. An unset bit flag is the equivalent of <quote>cannot</quote> and is represented as a <quote>-</quote> character. <example> <title>Example File</title> <programlisting> -rwxr-x--- Means: The owner (user) can read, write, execute the group can read and execute - everyone else can NOT do anything with it + everyone else cannot do anything with it. </programlisting> </example> @@ -346,7 +370,7 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 </para> <para> - The letters `rwxXst' set permissions for the user, group and others as: read (r), write (w), execute (or access for directories) (x), + The letters <constant>rwxXst</constant> set permissions for the user, group and others as: read (r), write (w), execute (or access for directories) (x), execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), sticky (t). </para> @@ -354,20 +378,20 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 <para> 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. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on - directories, such as /tmp, that are world-writable. + directories, such as <filename>/tmp</filename>, that are world-writable. </para> <para> 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 - group whose 'set user or group' bit is set. This can be very helpful in setting up directories that for which it is desired that + group whose `set user or group' bit is set. This can be helpful in setting up directories for which it is desired that all users who are in a group should be able to write to and read from a file, particularly when it is undesirable for that file - to be exclusively owned by a user who's primary group is not the group that all such users belong to. + to be exclusively owned by a user whose primary group is not the group that all such users belong to. </para> <para> When a directory is set <constant>drw-r-----</constant> this means that the owner can read and create (write) files in it, but because - the (x) execute flags are not set files can not be listed (seen) in the directory by anyone. The group can read files in the - directory but can NOT create new files. NOTE: If files in the directory are set to be readable and writable for the group, then + the (x) execute flags are not set, files cannot be listed (seen) in the directory by anyone. The group can read files in the + directory but cannot create new files. If files in the directory are set to be readable and writable for the group, then group members will be able to write to (or delete) them. </para> @@ -378,34 +402,40 @@ drwsrwsrwx 2 maryo gnomes 48 2003-05-12 22:29 muchado08 <sect1> <title>Share Definition Access Controls</title> + <para> -The following parameters in the &smb.conf; file sections that define a share control or affect access controls. -Before using any of the following options please refer to the man page for &smb.conf;. +<indexterm><primary>permissions</primary><secondary>share</secondary></indexterm> +The following parameters in the &smb.conf; file sections define a share control or effect access controls. +Before using any of the following options, please refer to the man page for &smb.conf;. </para> <sect2> - <title>User and Group Based Controls</title> + <title>User and Group-Based Controls</title> <para> - User and group based controls can prove very useful. In some situations it is distinctly desirable to affect all - file system operations as if a single user is doing this, the use of the <smbconfoption><name>force user</name></smbconfoption> and - <smbconfoption><name>force group</name></smbconfoption> behaviour will achieve this. In other situations it may be necessary to affect a - paranoia level of control to ensure that only particular authorised persons will be able to access a share or - it's contents, here the use of the <smbconfoption><name>valid users</name></smbconfoption> or the <smbconfoption><name>invalid users</name></smbconfoption> may - be most useful. + User and group-based controls can prove quite useful. In some situations it is distinctly desirable to affect all + file system operations as if a single user were doing so. The use of the <smbconfoption><name>force user</name></smbconfoption> and + <smbconfoption><name>force group</name></smbconfoption> behavior will achieve this. In other situations it may be necessary to effect a + paranoia level of control to ensure that only particular authorized persons will be able to access a share or + its contents. Here the use of the <smbconfoption><name>valid users</name></smbconfoption> or the + <smbconfoption><name>invalid users</name></smbconfoption> may be most useful. </para> <para> As always, it is highly advisable to use the least difficult to maintain and the least ambiguous method for - controlling access. Remember, that when you leave the scene someone else will need to provide assistance and - if that person finds too great a mess, or if they do not understand what you have done then there is risk of + controlling access. Remember, when you leave the scene someone else will need to provide assistance and + if he finds too great a mess or does not understand what you have done, there is risk of Samba being removed and an alternative solution being adopted. </para> - <table frame='all' pgwide='0'><title>User and Group Based Controls</title> + <para> + <link linkend="ugbc"/> enumerates these controls. + </para> + + <table frame='all' pgwide='0' id="ugbc"><title>User and Group Based Controls</title> <tgroup cols='2'> <colspec align="left"/> - <colspec align="justify"/> + <colspec align="justify" colwidth="1*"/> <thead> <row> <entry align="center">Control Parameter</entry> @@ -417,7 +447,7 @@ Before using any of the following options please refer to the man page for &smb. <entry><smbconfoption><name>admin users</name></smbconfoption></entry> <entry><para> List of users who will be granted administrative privileges on the share. - They will do all file operations as the super-user (root). + They will do all file operations as the super-user (root). Any user in this list will be able to do anything they like on the share, irrespective of file permissions. </para></entry> @@ -465,7 +495,7 @@ Before using any of the following options please refer to the man page for &smb. <row> <entry><smbconfoption><name>username</name></smbconfoption></entry> <entry><para> - Refer to the &smb.conf; man page for more information - this is a complex and potentially misused parameter. + Refer to the &smb.conf; man page for more information -- this is a complex and potentially misused parameter. </para></entry> </row> <row> @@ -487,19 +517,24 @@ Before using any of the following options please refer to the man page for &smb. </sect2> <sect2> - <title>File and Directory Permissions Based Controls</title> + <title>File and Directory Permissions-Based Controls</title> <para> - The following file and directory permission based controls, if misused, can result in considerable difficulty to - diagnose the cause of mis-configuration. Use them sparingly and carefully. By gradually introducing each one by one - undesirable side-effects may be detected. In the event of a problem, always comment all of them out and then gradually - re-introduce them in a controlled fashion. + The following file and directory permission-based controls, if misused, can result in considerable difficulty to + diagnose causes of misconfiguration. Use them sparingly and carefully. By gradually introducing each one by one, + undesirable side effects may be detected. In the event of a problem, always comment all of them out and then gradually + reintroduce them in a controlled way. </para> - <table frame='all'><title>File and Directory Permission Based Controls</title> + <para> + Refer to <link linkend="fdpbc"/> for information regarding the parameters that may be used to affect file and + directory permission-based access controls. + </para> + + <table frame='all' id="fdpbc"><title>File and Directory Permission Based Controls</title> <tgroup cols='2'> <colspec align="left"/> - <colspec align="justify"/> + <colspec align="justify" colwidth="1*"/> <thead> <row> <entry align="center">Control Parameter</entry> @@ -540,7 +575,7 @@ Before using any of the following options please refer to the man page for &smb. <row> <entry><smbconfoption><name>force directory security mode</name></smbconfoption></entry> <entry><para> - Controls UNIX permission bits modified when a Windows NT client is manipulating UNIX permissions on a directory + Controls UNIX permission bits modified when a Windows NT client is manipulating UNIX permissions on a directory. </para></entry> </row> <row> @@ -584,13 +619,13 @@ Before using any of the following options please refer to the man page for &smb. <para> The following are documented because of the prevalence of administrators creating inadvertent barriers to file - access by not understanding the full implications of &smb.conf; file settings. + access by not understanding the full implications of &smb.conf; file settings. See <link linkend="mcoc"/>. </para> - <table frame='all'><title>Other Controls</title> + <table frame='all' id="mcoc"><title>Other Controls</title> <tgroup cols='2'> - <colspec align="justify"/> - <colspec align="justify"/> + <colspec align="justify" colwidth="1*"/> + <colspec align="justify" colwidth="1*"/> <thead> <row> <entry align="center">Control Parameter</entry> @@ -602,7 +637,7 @@ Before using any of the following options please refer to the man page for &smb. <entry><smbconfoption><name>case sensitive</name></smbconfoption>, <smbconfoption><name>default case</name></smbconfoption>, <smbconfoption><name>short preserve case</name></smbconfoption></entry> <entry><para> This means that all file name lookup will be done in a case sensitive manner. - Files will be created with the precise filename Samba received from the MS Windows client. + Files will be created with the precise file name Samba received from the MS Windows client. </para></entry> </row> <row> @@ -614,7 +649,7 @@ Before using any of the following options please refer to the man page for &smb. <row> <entry><smbconfoption><name>dont descend</name></smbconfoption></entry> <entry><para> - Allows to specify a comma-delimited list of directories that the server should always show as empty. + Allows specifying a comma-delimited list of directories that the server should always show as empty. </para></entry> </row> <row> @@ -626,15 +661,15 @@ Before using any of the following options please refer to the man page for &smb. <row> <entry><smbconfoption><name>dos filetimes</name></smbconfoption></entry> <entry><para> - DOS and Windows allows users to change file time stamps if they can write to the file. POSIX semantics prevent this. - This options allows DOS and Windows behaviour. + DOS and Windows allow users to change file time stamps if they can write to the file. POSIX semantics prevent this. + This option allows DOS and Windows behavior. </para></entry> </row> <row> <entry><smbconfoption><name>fake oplocks</name></smbconfoption></entry> <entry><para> Oplocks are the way that SMB clients get permission from a server to locally cache file operations. If a server grants an - oplock then the client is free to assume that it is the only one accessing the file and it will aggressively cache file data. + oplock, the client is free to assume that it is the only one accessing the file and it will aggressively cache file data. </para></entry> </row> <row> @@ -666,16 +701,18 @@ Before using any of the following options please refer to the man page for &smb. <sect1> <title>Access Controls on Shares</title> + <para> +<indexterm><primary>permissions</primary><secondary>share ACLs</secondary></indexterm> This section deals with how to configure Samba per share access control restrictions. By default, Samba sets no restrictions on the share itself. Restrictions on the share itself - can be set on MS Windows NT4/200x/XP shares. This can be a very effective way to limit who can + can be set on MS Windows NT4/200x/XP shares. This can be an effective way to limit who can connect to a share. In the absence of specific restrictions the default setting is to allow - the global user <constant>Everyone</constant> Full Control (ie: Full control, Change and Read). + the global user <constant>Everyone - Full Control</constant> (full control, change and read). </para> <para> - At this time Samba does NOT provide a tool for configuring access control setting on the Share + At this time Samba does not provide a tool for configuring access control setting on the share itself. Samba does have the capacity to store and act on access control settings, but the only way to create those settings is to use either the NT4 Server Manager or the Windows 200x MMC for Computer Management. @@ -683,10 +720,10 @@ Before using any of the following options please refer to the man page for &smb. <para> Samba stores the per share access control settings in a file called <filename>share_info.tdb</filename>. - The location of this file on your system will depend on how samba was compiled. The default location + The location of this file on your system will depend on how Samba was compiled. The default location for Samba's tdb files is under <filename>/usr/local/samba/var</filename>. If the <filename>tdbdump</filename> utility has been compiled and installed on your system, then you can examine the contents of this file - by: <userinput>tdbdump share_info.tdb</userinput>. + by executing: <command>tdbdump share_info.tdb</command> in the directory containing the tdb files. </para> <sect2> @@ -701,18 +738,20 @@ Before using any of the following options please refer to the man page for &smb. <para> The tool you need to use to manage share permissions on a Samba server is the NT Server Manager. Server Manager is shipped with Windows NT4 Server products but not with Windows NT4 Workstation. - You can obtain the NT Server Manager for MS Windows NT4 Workstation from Microsoft - see details below. + You can obtain the NT Server Manager for MS Windows NT4 Workstation from Microsoft &smbmdash; see details below. </para> + <?latex \newpage ?> + <procedure> <title>Instructions</title> <step><para> - Launch the <application>NT4 Server Manager</application>, click on the Samba server you want to administer, then from the menu - select <guimenu>Computer</guimenu>, then click on the <guimenuitem>Shared Directories</guimenuitem> entry. + Launch the <application>NT4 Server Manager</application>, click on the Samba server you want to administer. From the menu + select <guimenu>Computer</guimenu>, then click on <guimenuitem>Shared Directories</guimenuitem>. </para></step> <step><para> - Now click on the share that you wish to manage, then click on the <guilabel>Properties</guilabel> tab, next click on + Click on the share that you wish to manage, then click the <guilabel>Properties</guilabel> tab. then click the <guilabel>Permissions</guilabel> tab. Now you can add or change access control settings as you wish. </para></step> </procedure> @@ -724,47 +763,47 @@ Before using any of the following options please refer to the man page for &smb. <para> On <application>MS Windows NT4/200x/XP</application> system access control lists on the share itself are set using native - tools, usually from file manager. For example, in Windows 200x: right click on the shared folder, + tools, usually from File Manager. For example, in Windows 200x, right click on the shared folder, then select <guimenuitem>Sharing</guimenuitem>, then click on <guilabel>Permissions</guilabel>. The default - Windows NT4/200x permission allows <emphasis>Everyone</emphasis> Full Control on the Share. + Windows NT4/200x permission allows <quote>Everyone</quote> full control on the share. </para> <para> - MS Windows 200x and later all comes with a tool called the <application>Computer Management</application> snap-in for the - Microsoft Management Console (MMC). This tool is located by clicking on <filename>Control Panel -> - Administrative Tools -> Computer Management</filename>. + MS Windows 200x and later versions come with a tool called the <application>Computer Management</application> snap-in for the + Microsoft Management Console (MMC). This tool is located by clicking on <guimenu>Control Panel -> + Administrative Tools -> Computer Management</guimenu>. </para> <procedure> <title>Instructions</title> <step><para> - After launching the MMC with the Computer Management snap-in, click on the menu item <guimenuitem>Action</guimenuitem>, - select <guilabel>Connect to another computer</guilabel>. If you are not logged onto a domain you will be prompted - to enter a domain login user identifier and a password. This will authenticate you to the domain. - If you where already logged in with administrative privilege this step is not offered. + After launching the MMC with the Computer Management snap-in, click the menu item <guimenuitem>Action</guimenuitem>, + and select <guilabel>Connect to another computer</guilabel>. If you are not logged onto a domain you will be prompted + to enter a domain login user identifier and a password. This will authenticate you to the domain. + If you are already logged in with administrative privilege, this step is not offered. </para></step> <step><para> - If the Samba server is not shown in the <guilabel>Select Computer</guilabel> box, then type in the name of the target - Samba server in the field <guilabel>Name:</guilabel>. Now click on the <guibutton>[+]</guibutton> next to + If the Samba server is not shown in the <guilabel>Select Computer</guilabel> box, type in the name of the target + Samba server in the field <guilabel>Name:</guilabel>. Now click the on <guibutton>[+]</guibutton> next to <guilabel>System Tools</guilabel>, then on the <guibutton>[+]</guibutton> next to <guilabel>Shared Folders</guilabel> in the left panel. </para></step> <step><para> - Now in the right panel, double-click on the share you wish to set access control permissions on. - Then click on the tab <guilabel>Share Permissions</guilabel>. It is now possible to add access control entities - to the shared folder. Do NOT forget to set what type of access (full control, change, read) you + In the right panel, double-click on the share on which you wish to set access control permissions. + Then click the tab <guilabel>Share Permissions</guilabel>. It is now possible to add access control entities + to the shared folder. Remember to set what type of access (full control, change, read) you wish to assign for each entry. </para></step> </procedure> <warning> <para> - Be careful. If you take away all permissions from the <constant>Everyone</constant> user without removing this user - then effectively no user will be able to access the share. This is a result of what is known as - ACL precedence. ie: Everyone with <emphasis>no access</emphasis> means that MaryK who is part of the group - <constant>Everyone</constant> will have no access even if this user is given explicit full control access. + Be careful. If you take away all permissions from the <constant>Everyone</constant> user without removing this user, + effectively no user will be able to access the share. This is a result of what is known as + ACL precedence. Everyone with <emphasis>no access</emphasis> means that <constant>MaryK</constant> who is part of the group + <constant>Everyone</constant> will have no access even if she is given explicit full control access. </para> </warning> @@ -777,27 +816,29 @@ Before using any of the following options please refer to the man page for &smb. <title>MS Windows Access Control Lists and UNIX Interoperability</title> <sect2> - <title>Managing UNIX permissions Using NT Security Dialogs</title> + <title>Managing UNIX Permissions Using NT Security Dialogs</title> + <para> +<indexterm><primary>permissions</primary><secondary>file/directory ACLs</secondary></indexterm> Windows NT clients can use their native security settings dialog box to view and modify the underlying UNIX permissions. </para> <para> - Note that this ability is careful not to compromise the security of the UNIX host Samba is running on, and + This ability is careful not to compromise the security of the UNIX host on which Samba is running, and still obeys all the file permission rules that a Samba administrator can set. </para> <para> - Samba does not attempt to go beyond POSIX ACLs, so that the various finer-grained access control - options provided in Windows are actually ignore. + Samba does not attempt to go beyond POSIX ACLs, so the various finer-grained access control + options provided in Windows are actually ignored. </para> <note> <para> All access to UNIX/Linux system files via Samba is controlled by the operating system file access controls. - When trying to figure out file access problems it is vitally important to find the identity of the Windows + When trying to figure out file access problems, it is vitally important to find the identity of the Windows user as it is presented by Samba at the point of file access. This can best be determined from the Samba log files. </para> @@ -808,57 +849,57 @@ Before using any of the following options please refer to the man page for &smb. <title>Viewing File Security on a Samba Share</title> <para> - From an NT4/2000/XP client, single-click with the right mouse button on any file or directory in a Samba - mounted drive letter or UNC path. When the menu pops-up, click on the <guilabel>Properties</guilabel> - entry at the bottom of the menu. This brings up the file properties dialog box. Click on the tab - <guilabel>Security</guilabel> and you will see three buttons, <guibutton>Permissions</guibutton>, + From an NT4/2000/XP client, right click on any file or directory in a Samba-mounted drive letter + or UNC path. When the menu pops up, click on the <guilabel>Properties</guilabel> entry at the bottom + of the menu. This brings up the file <constant>Properties</constant> dialog box. Click on the + <guilabel>Security</guilabel> tab and you will see three buttons: <guibutton>Permissions</guibutton>, <guibutton>Auditing</guibutton>, and <guibutton>Ownership</guibutton>. The <guibutton>Auditing</guibutton> - button will cause either an error message <errorname>A requested privilege is not held by the client</errorname> + button will cause either an error message <errorname>`A requested privilege is not held by the client'</errorname> to appear if the user is not the NT Administrator, or a dialog which is intended to allow an Administrator to add auditing requirements to a file if the user is logged on as the NT Administrator. This dialog is non-functional with a Samba share at this time, as the only useful button, the <guibutton>Add</guibutton> - button will not currently allow a list of users to be seen. + button, will not currently allow a list of users to be seen. </para> </sect2> <sect2> - <title>Viewing file ownership</title> + <title>Viewing File Ownership</title> <para> Clicking on the <guibutton>Ownership</guibutton> button brings up a dialog box telling you who owns - the given file. The owner name will be of the form: + the given file. The owner name will be displayed like this: </para> <para> - <command>"SERVER\user (Long name)"</command> + <command><quote>SERVER\user (Long name)</quote></command> </para> <para> - Where <replaceable>SERVER</replaceable> is the NetBIOS name of the Samba server, <replaceable>user</replaceable> + <replaceable>SERVER</replaceable> is the NetBIOS name of the Samba server, <replaceable>user</replaceable> is the user name of the UNIX user who owns the file, and <replaceable>(Long name)</replaceable> is the descriptive string identifying the user (normally found in the GECOS field of the UNIX password database). Click on the <guibutton>Close </guibutton> button to remove this dialog. </para> <para> - If the parameter <smbconfoption><name>nt acl support</name></smbconfoption> is set to <constant>false</constant> - then the file owner will be shown as the NT user <constant>"Everyone"</constant>. + If the parameter <smbconfoption><name>nt acl support</name></smbconfoption> is set to <constant>false</constant>, + the file owner will be shown as the NT user <emphasis>Everyone</emphasis>. </para> <para> The <guibutton>Take Ownership</guibutton> button will not allow you to change the ownership of this file to - yourself (clicking on it will display a dialog box complaining that the user you are currently logged onto + yourself (clicking it will display a dialog box complaining that the user you are currently logged onto the NT client cannot be found). The reason for this is that changing the ownership of a file is a privileged operation in UNIX, available only to the <emphasis>root</emphasis> user. As clicking on this button causes - NT to attempt to change the ownership of a file to the current user logged into the NT client this will + NT to attempt to change the ownership of a file to the current user logged into the NT clienti, this will not work with Samba at this time.</para> <para> - There is an NT chown command that will work with Samba and allow a user with Administrator privilege connected + There is an NT <command>chown</command> command that will work with Samba and allow a user with Administrator privilege connected to a Samba server as root to change the ownership of files on both a local NTFS filesystem or remote mounted NTFS or Samba drive. This is available as part of the <application>Seclib</application> NT security library written - by Jeremy Allison of the Samba-Team, available from the main Samba FTP site.</para> + by Jeremy Allison of the Samba Team, and is available from the main Samba FTP site.</para> </sect2> @@ -867,12 +908,12 @@ Before using any of the following options please refer to the man page for &smb. <para> The third button is the <guibutton>Permissions</guibutton> button. Clicking on this brings up a dialog box - that shows both the permissions and the UNIX owner of the file or directory. The owner is displayed in the form: + that shows both the permissions and the UNIX owner of the file or directory. The owner is displayed like this: </para> - <para><command>"<replaceable>SERVER</replaceable>\ + <para><command><replaceable>SERVER</replaceable>\ <replaceable>user</replaceable> - <replaceable>(Long name)</replaceable>"</command></para> + <replaceable>(Long name)</replaceable></command></para> <para>Where <replaceable>SERVER</replaceable> is the NetBIOS name of the Samba server, <replaceable>user</replaceable> is the user name of the UNIX user who owns the file, and @@ -880,9 +921,9 @@ Before using any of the following options please refer to the man page for &smb. GECOS field of the UNIX password database).</para> <para> - If the parameter <smbconfoption><name>nt acl support</name></smbconfoption> is set to <constant>false</constant> - then the file owner will be shown as the NT user <constant>"Everyone"</constant> and the permissions will be - shown as NT "Full Control". + If the parameter <smbconfoption><name>nt acl support</name></smbconfoption> is set to <constant>false</constant>, + the file owner will be shown as the NT user <constant>Everyone</constant> and the permissions will be + shown as NT <quote>Full Control</quote>. </para> @@ -894,76 +935,59 @@ Before using any of the following options please refer to the man page for &smb. <sect3> <title>File Permissions</title> - <para>The standard UNIX user/group/world triplet and - the corresponding "read", "write", "execute" permissions - triplets are mapped by Samba into a three element NT ACL - with the 'r', 'w', and 'x' bits mapped into the corresponding - NT permissions. The UNIX world permissions are mapped into - the global NT group <constant>Everyone</constant>, followed - by the list of permissions allowed for UNIX world. The UNIX - owner and group permissions are displayed as an NT - <guiicon>user</guiicon> icon and an NT <guiicon>local - group</guiicon> icon respectively followed by the list + <para>The standard UNIX user/group/world triplet and the corresponding <constant>read, write, execute</constant> permissions + triplets are mapped by Samba into a three element NT ACL with the <quote>r</quote>, <quote>w</quote> and <quote>x</quote> bits mapped into the corresponding + NT permissions. The UNIX world permissions are mapped into the global NT group <constant>Everyone</constant>, followed + by the list of permissions allowed for UNIX world. The UNIX owner and group permissions are displayed as an NT + <guiicon>user</guiicon> icon and an NT <guiicon>local group</guiicon> icon, respectively, followed by the list of permissions allowed for the UNIX user and group.</para> - <para>As many UNIX permission sets don't map into common - NT names such as <constant>read</constant>, <constant> - "change"</constant> or <constant>full control</constant> then - usually the permissions will be prefixed by the words <constant> - "Special Access"</constant> in the NT display list.</para> - - <para>But what happens if the file has no permissions allowed - for a particular UNIX user group or world component? In order - to allow "no permissions" to be seen and modified then Samba - overloads the NT <command>"Take Ownership"</command> ACL attribute - (which has no meaning in UNIX) and reports a component with - no permissions as having the NT <command>"O"</command> bit set. - This was chosen of course to make it look like a zero, meaning - zero permissions. More details on the decision behind this will - be given below.</para> + <para>Because many UNIX permission sets do not map into common NT names such as <constant>read</constant>, + <constant>change</constant> or <constant>full control</constant>, usually the permissions will be prefixed + by the words <constant>Special Access</constant> in the NT display list.</para> + + <para>But what happens if the file has no permissions allowed for a particular UNIX user group or world component? In order + to allow <quote>no permissions</quote> to be seen and modified Samba then overloads the NT <constant>Take Ownership</constant> ACL attribute + (which has no meaning in UNIX) and reports a component with no permissions as having the NT <command>O</command> bit set. + This was chosen, of course, to make it look like a zero, meaning zero permissions. More details on the decision behind this is + given below.</para> </sect3> <sect3> <title>Directory Permissions</title> - <para>Directories on an NT NTFS file system have two - different sets of permissions. The first set of permissions - is the ACL set on the directory itself, this is usually displayed - in the first set of parentheses in the normal <constant>"RW"</constant> - NT style. This first set of permissions is created by Samba in - exactly the same way as normal file permissions are, described + <para>Directories on an NT NTFS file system have two different sets of permissions. The first set is the ACL set on the + directory itself, which is usually displayed in the first set of parentheses in the normal <constant>RW</constant> + NT style. This first set of permissions is created by Samba in exactly the same way as normal file permissions are, described above, and is displayed in the same way.</para> - <para>The second set of directory permissions has no real meaning - in the UNIX permissions world and represents the <constant> - inherited</constant> permissions that any file created within - this directory would inherit.</para> + <para>The second set of directory permissions has no real meaning in the UNIX permissions world and represents the <constant> + inherited</constant> permissions that any file created within this directory would inherit.</para> - <para>Samba synthesises these inherited permissions for NT by - returning as an NT ACL the UNIX permission mode that a new file + <para>Samba synthesises these inherited permissions for NT by returning as an NT ACL the UNIX permission mode that a new file created by Samba on this share would receive.</para> </sect3> </sect2> <sect2> - <title>Modifying file or directory permissions</title> + <title>Modifying File or Directory Permissions</title> <para>Modifying file and directory permissions is as simple as changing the displayed permissions in the dialog box, and - clicking the <guibutton>OK</guibutton> button. However, there are + clicking on <guibutton>OK</guibutton>. However, there are limitations that a user needs to be aware of, and also interactions with the standard Samba permission masks and mapping of DOS attributes that need to also be taken into account.</para> <para>If the parameter <smbconfoption><name>nt acl support</name></smbconfoption> - is set to <constant>false</constant> then any attempt to set - security permissions will fail with an <errorname>"Access Denied" + is set to <constant>false</constant>, any attempt to set + security permissions will fail with an <errorname>`Access Denied' </errorname> message.</para> - <para>The first thing to note is that the <guibutton>"Add"</guibutton> + <para>The first thing to note is that the <guibutton>Add</guibutton> button will not return a list of users in Samba (it will give - an error message of <errorname>The remote procedure call failed - and did not execute</errorname>). This means that you can only + an error message saying <errorname>`The remote procedure call failed + and did not execute'</errorname>). This means that you can only manipulate the current user/group/world permissions listed in the dialog box. This actually works quite well as these are the only permissions that UNIX actually has.</para> @@ -971,88 +995,82 @@ Before using any of the following options please refer to the man page for &smb. <para>If a permission triplet (either user, group, or world) is removed from the list of permissions in the NT dialog box, then when the <guibutton>OK</guibutton> button is pressed it will - be applied as "no permissions" on the UNIX side. If you then - view the permissions again the "no permissions" entry will appear - as the NT <command>"O"</command> flag, as described above. This + be applied as <quote>no permissions</quote> on the UNIX side. If you then + view the permissions again, the <quote>no permissions</quote> entry will appear + as the NT <command>O</command> flag, as described above. This allows you to add permissions back to a file or directory once you have removed them from a triplet component.</para> - <para>As UNIX supports only the "r", "w" and "x" bits of - an NT ACL then if other NT security attributes such as "Delete - access" are selected then they will be ignored when applied on - the Samba server.</para> + <para>As UNIX supports only the <quote>r</quote>, <quote>w</quote> and <quote>x</quote> bits of + an NT ACL, if other NT security attributes such as <constant>Delete Access</constant> are + selected they will be ignored when applied on the Samba server.</para> - <para>When setting permissions on a directory the second + <para>When setting permissions on a directory, the second set of permissions (in the second set of parentheses) is by default applied to all files within that directory. If this - is not what you want you must uncheck the <guilabel>Replace + is not what you want, you must uncheck the <guilabel>Replace permissions on existing files</guilabel> checkbox in the NT - dialog before clicking <guibutton>OK</guibutton>.</para> + dialog before clicking on <guibutton>OK</guibutton>.</para> <para>If you wish to remove all permissions from a - user/group/world component then you may either highlight the - component and click the <guibutton>Remove</guibutton> button, + user/group/world component, you may either highlight the + component and click on the <guibutton>Remove</guibutton> button, or set the component to only have the special <constant>Take - Ownership</constant> permission (displayed as <command>"O" + Ownership</constant> permission (displayed as <command>O </command>) highlighted.</para> </sect2> <sect2> - <title>Interaction with the standard Samba create mask - parameters</title> + <title>Interaction with the Standard Samba <quote>create mask</quote> Parameters</title> - <para>There are four parameters - to control interaction with the standard Samba create mask parameters. - These are : + <para>There are four parameters that control interaction with the standard Samba <parameter>create mask</parameter> parameters. + These are: <itemizedlist> - <listitem><para><smbconfoption><name>security mask</name></smbconfoption></para></listitem> - <listitem><para><smbconfoption><name>force security mode</name></smbconfoption></para></listitem> - <listitem><para><smbconfoption><name>directory security mask</name></smbconfoption></para></listitem> - <listitem><para><smbconfoption><name>force directory security mode</name></smbconfoption></para></listitem> - </itemizedlist> + <listitem><smbconfoption><name>security mask</name></smbconfoption></listitem> + <listitem><smbconfoption><name>force security mode</name></smbconfoption></listitem> + <listitem><smbconfoption><name>directory security mask</name></smbconfoption></listitem> + <listitem><smbconfoption><name>force directory security mode</name></smbconfoption></listitem> + </itemizedlist> </para> - <para>Once a user clicks <guibutton>OK</guibutton> to apply the - permissions Samba maps the given permissions into a user/group/world - r/w/x triplet set, and then will check the changed permissions for a + <para>Once a user clicks on <guibutton>OK</guibutton> to apply the + permissions, Samba maps the given permissions into a user/group/world + r/w/x triplet set, and then checks the changed permissions for a file against the bits set in the <smbconfoption><name>security mask</name></smbconfoption> parameter. Any bits that - were changed that are not set to '1' in this parameter are left alone + were changed that are not set to <quote>1</quote> in this parameter are left alone in the file permissions.</para> <para>Essentially, zero bits in the <smbconfoption><name>security mask</name></smbconfoption> - mask may be treated as a set of bits the user is <emphasis>not</emphasis> + may be treated as a set of bits the user is <emphasis>not</emphasis> allowed to change, and one bits are those the user is allowed to change. </para> - <para>If not set explicitly this parameter is set to the same value as - the <smbconfoption><name>create mask</name></smbconfoption> parameter. To allow a user to modify all the - user/group/world permissions on a file, set this parameter - to 0777.</para> + <para>If not explicitly set, this parameter defaults to the same value as + the <smbconfoption><name>create mask</name></smbconfoption> parameter. To allow a user to modify all the + user/group/world permissions on a file, set this parameter to 0777. + </para> - <para>Next Samba checks the changed permissions for a file against - the bits set in the + <para>Next Samba checks the changed permissions for a file against the bits set in the <smbconfoption><name>force security mode</name></smbconfoption> parameter. Any bits - that were changed that correspond to bits set to '1' in this parameter + that were changed that correspond to bits set to <quote>1</quote> in this parameter are forced to be set.</para> - <para>Essentially, bits set in the <parameter>force security mode - </parameter> parameter may be treated as a set of bits that, when - modifying security on a file, the user has always set to be 'on'.</para> + <para>Essentially, bits set in the <parameter>force security mode</parameter> parameter + may be treated as a set of bits that, when modifying security on a file, the user has always set to be <quote>on</quote>.</para> - <para>If not set explicitly this parameter is set to the same value - as the <smbconfoption><name>force create mode</name></smbconfoption> parameter. + <para>If not explicitly set, this parameter defaults to the same value + as the <smbconfoption><name>force create mode</name></smbconfoption> parameter. To allow a user to modify all the user/group/world permissions on a file - with no restrictions set this parameter to 000.</para> - - <para>The <smbconfoption><name>security mask</name></smbconfoption> and <parameter>force + with no restrictions set this parameter to 000. The + <smbconfoption><name>security mask</name></smbconfoption> and <parameter>force security mode</parameter> parameters are applied to the change request in that order.</para> - <para>For a directory Samba will perform the same operations as - described above for a file except using the parameter <parameter> + <para>For a directory, Samba will perform the same operations as + described above for a file except it uses the parameter <parameter> directory security mask</parameter> instead of <parameter>security mask</parameter>, and <parameter>force directory security mode </parameter> parameter instead of <parameter>force security mode @@ -1062,16 +1080,15 @@ Before using any of the following options please refer to the man page for &smb. by default is set to the same value as the <parameter>directory mask </parameter> parameter and the <parameter>force directory security mode</parameter> parameter by default is set to the same value as - the <smbconfoption><name>force directory mode</name></smbconfoption> parameter. </para> - - <para>In this way Samba enforces the permission restrictions that - an administrator can set on a Samba share, whilst still allowing users + the <smbconfoption><name>force directory mode</name></smbconfoption> parameter. + In this way Samba enforces the permission restrictions that + an administrator can set on a Samba share, while still allowing users to modify the permission bits within that restriction.</para> <para>If you want to set up a share that allows users full control in modifying the permission bits on their files and directories and - doesn't force any particular bits to be set 'on', then set the following - parameters in the &smb.conf; file in that share specific section : + does not force any particular bits to be set <quote>on</quote>, then set the following + parameters in the &smb.conf; file in that share-specific section: </para> <smbconfblock> @@ -1083,29 +1100,29 @@ Before using any of the following options please refer to the man page for &smb. </sect2> <sect2> - <title>Interaction with the standard Samba file attribute mapping</title> + <title>Interaction with the Standard Samba File Attribute Mapping</title> <note> - <para>Samba maps some of the DOS attribute bits (such as "read - only") into the UNIX permissions of a file. This means there can + <para>Samba maps some of the DOS attribute bits (such as <quote>read + only</quote>) into the UNIX permissions of a file. This means there can be a conflict between the permission bits set via the security dialog and the permission bits set by the file attribute mapping. </para> </note> - <para>One way this can show up is if a file has no UNIX read access - for the owner it will show up as "read only" in the standard - file attributes tabbed dialog. Unfortunately this dialog is - the same one that contains the security info in another tab.</para> + <para>If a file has no UNIX read access for the owner, it will show up + as <quote>read only</quote> in the standard file attributes tabbed dialog. + Unfortunately, this dialog is the same one that contains the security information + in another tab.</para> <para>What this can mean is that if the owner changes the permissions - to allow themselves read access using the security dialog, clicks + to allow himself read access using the security dialog, clicks on <guibutton>OK</guibutton> to get back to the standard attributes tab - dialog, and then clicks <guibutton>OK</guibutton> on that dialog, then + dialog, and clicks on <guibutton>OK</guibutton> on that dialog, then NT will set the file permissions back to read-only (as that is what the attributes still say in the dialog). This means that after setting - permissions and clicking <guibutton>OK</guibutton> to get back to the - attributes dialog you should always hit <guibutton>Cancel</guibutton> + permissions and clicking on <guibutton>OK</guibutton> to get back to the + attributes dialog, you should always press <guibutton>Cancel</guibutton> rather than <guibutton>OK</guibutton> to ensure that your changes are not overridden.</para> </sect2> @@ -1115,31 +1132,31 @@ Before using any of the following options please refer to the man page for &smb. <title>Common Errors</title> <para> -File, Directory and Share access problems are very common on the mailing list. The following +File, directory and share access problems are common on the mailing list. The following are examples taken from the mailing list in recent times. </para> <sect2> - <title>Users can not write to a public share</title> + <title>Users Cannot Write to a Public Share</title> <para> <quote> - We are facing some troubles with file / directory permissions. I can log on the domain as admin user(root), - and there's a public share, on which everyone needs to have permission to create / modify files, but only - root can change the file, no one else can. We need to constantly go to server to + We are facing some troubles with file/directory permissions. I can log on the domain as admin user(root), + and there's a public share on which everyone needs to have permission to create/modify files, but only + root can change the file, no one else can. We need to constantly go to the server to <userinput>chgrp -R users *</userinput> and <userinput>chown -R nobody *</userinput> to allow others users to change the file. </quote> </para> <para> - There are many ways to solve this problem, here are a few hints: + There are many ways to solve this problem and here are a few hints: </para> <procedure> <step> <para> - Go to the top of the directory that is shared + Go to the top of the directory that is shared. </para> </step> @@ -1155,7 +1172,7 @@ are examples taken from the mailing list in recent times. </para> <note><para> - The above will set the 'sticky bit' on all directories. Read your + The above will set the <constant>sticky bit</constant> on all directories. Read your UNIX/Linux man page on what that does. It causes the OS to assign to all files created in the directories the ownership of the directory. @@ -1170,16 +1187,16 @@ are examples taken from the mailing list in recent times. </screen> </para> - <note> + <note><para> <para>This is the same as doing:</para> <screen> &prompt;<userinput>chown jack /foodbar</userinput> &prompt;<userinput>chgrp engr /foodbar</userinput> </screen> - </note> + </para></note> </step> <step> - <para>Now do: + <para>Now type: <screen> &prompt;<userinput>chmod 6775 /foodbar</userinput> @@ -1196,7 +1213,7 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar </step> <step> - <para>Now do: + <para>Now type: <screen> &prompt;<userinput>su - jill</userinput> &prompt;<userinput>cd /foodbar</userinput> @@ -1224,8 +1241,8 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar </para> <note><para> - The above are only needed <emphasis>if</emphasis> your users are <emphasis>not</emphasis> members of the group - you have used. ie: Within the OS do not have write permission on the directory. + These procedures are needed only if your users are not members of the group + you have used. That is if within the OS do not have write permission on the directory. </para> </note> @@ -1242,34 +1259,35 @@ drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar <sect2> - <title>I have set force user but Samba still makes <emphasis>root</emphasis> the owner of all the files I touch!</title> + <title>File Operations Done as <emphasis>root</emphasis> with <emphasis>force user</emphasis> Set</title> + <para> - When you have a user in <smbconfoption><name>admin users</name></smbconfoption>, samba will always do file operations for - this user as <emphasis>root</emphasis>, even if <smbconfoption><name>force user</name></smbconfoption> has been set. + When you have a user in <smbconfoption><name>admin users</name></smbconfoption>, Samba will always do file operations for + this user as <emphasis>root</emphasis>, even if <smbconfoption><name>force user</name></smbconfoption> has been set. </para> </sect2> <sect2> - <title>MS Word with Samba changes owner of file</title> + <title>MS Word with Samba Changes Owner of File</title> <para> - <emphasis>Question:</emphasis> <quote>When userB saves a word document that is owned by userA the updated file is now owned by userB. + <emphasis>Question:</emphasis> <quote>When user B saves a word document that is owned by user A the updated file is now owned by user B. Why is Samba doing this? How do I fix this?</quote> </para> <para> - <emphasis>Answer:</emphasis> Word does the following when you modify/change a Word document: Word Creates a NEW document with + <emphasis>Answer:</emphasis> Word does the following when you modify/change a Word document: MS Word creates a NEW document with a temporary name, Word then closes the old document and deletes it, Word then renames the new document to the original document name. - There is NO mechanism by which Samba CAN IN ANY WAY know that the new document really should be owned by the owners - of the original file. Samba has no way of knowing that the file will be renamed by MS Word. As far as Samba is able + There is no mechanism by which Samba can in any way know that the new document really should be owned by the owners + of the original file. Samba has no way of knowing that the file will be renamed by MS Word. As far as Samba is able to tell, the file that gets created is a NEW file, not one that the application (Word) is updating. </para> <para> There is a work-around to solve the permissions problem. That work-around involves understanding how you can manage file - system behaviour from within the &smb.conf; file, as well as understanding how Unix file systems work. Set on the directory - in which you are changing word documents: <command>chmod g+s 'directory_name'</command> This ensures that all files will - be created with the group that owns the directory. In smb.conf share declaration section set: + system behavior from within the &smb.conf; file, as well as understanding how UNIX file systems work. Set on the directory + in which you are changing Word documents: <command>chmod g+s `directory_name'</command> This ensures that all files will + be created with the group that owns the directory. In &smb.conf; share declaration section set: </para> <para> |