1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="DIRECTORYMASK"/>directory mask (S)</term>
3 <listitem><para>This parameter is the octal modes which are
4 used when converting DOS modes to UNIX modes when creating UNIX
7 <para>When a directory is created, the necessary permissions are
8 calculated according to the mapping from DOS modes to UNIX permissions,
9 and the resulting UNIX mode is then bit-wise 'AND'ed with this
10 parameter. This parameter may be thought of as a bit-wise MASK for
11 the UNIX modes of a directory. Any bit <emphasis>not</emphasis> set
12 here will be removed from the modes set on a directory when it is
15 <para>The default value of this parameter removes the 'group'
16 and 'other' write bits from the UNIX mode, allowing only the
17 user who owns the directory to modify it.</para>
19 <para>Following this Samba will bit-wise 'OR' the UNIX mode
20 created from this parameter with the value of the <link linkend="FORCEDIRECTORYMODE"><parameter moreinfo="none">force directory mode
21 </parameter></link> parameter. This parameter is set to 000 by
22 default (i.e. no extra mode bits are added).</para>
24 <para>Note that this parameter does not apply to permissions
25 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
26 a mask on access control lists also, they need to set the <link linkend="DIRECTORYSECURITYMASK"><parameter moreinfo="none">directory security mask</parameter></link>.</para>
28 <para>See the <link linkend="FORCEDIRECTORYMODE"><parameter moreinfo="none">force
29 directory mode</parameter></link> parameter to cause particular mode
30 bits to always be set on created directories.</para>
32 <para>See also the <link linkend="CREATEMODE"><parameter moreinfo="none">create mode
33 </parameter></link> parameter for masking mode bits on created files,
34 and the <link linkend="DIRECTORYSECURITYMASK"><parameter moreinfo="none">directory
35 security mask</parameter></link> parameter.</para>
37 <para>Also refer to the <link linkend="INHERITPERMISSIONS"><parameter moreinfo="none">
38 inherit permissions</parameter></link> parameter.</para>
40 <para>Default: <command moreinfo="none">directory mask = 0755</command></para>
41 <para>Example: <command moreinfo="none">directory mask = 0775</command></para>