~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/cifs/usage.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/cifs/usage.rst (Architecture mips) and /Documentation/admin-guide/cifs/usage.rst (Architecture ppc)


  1 =====                                               1 =====
  2 Usage                                               2 Usage
  3 =====                                               3 =====
  4                                                     4 
  5 This module supports the SMB3 family of advanc      5 This module supports the SMB3 family of advanced network protocols (as well
  6 as older dialects, originally called "CIFS" or      6 as older dialects, originally called "CIFS" or SMB1).
  7                                                     7 
  8 The CIFS VFS module for Linux supports many ad      8 The CIFS VFS module for Linux supports many advanced network filesystem
  9 features such as hierarchical DFS like namespa      9 features such as hierarchical DFS like namespace, hardlinks, locking and more.
 10 It was designed to comply with the SNIA CIFS T     10 It was designed to comply with the SNIA CIFS Technical Reference (which
 11 supersedes the 1992 X/Open SMB Standard) as we     11 supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
 12 practical interoperability with Windows 2000,      12 practical interoperability with Windows 2000, Windows XP, Samba and equivalent
 13 servers.  This code was developed in participa     13 servers.  This code was developed in participation with the Protocol Freedom
 14 Information Foundation.  CIFS and now SMB3 has     14 Information Foundation.  CIFS and now SMB3 has now become a defacto
 15 standard for interoperating between Macs and W     15 standard for interoperating between Macs and Windows and major NAS appliances.
 16                                                    16 
 17 Please see                                         17 Please see
 18 MS-SMB2 (for detailed SMB2/SMB3/SMB3.1.1 proto     18 MS-SMB2 (for detailed SMB2/SMB3/SMB3.1.1 protocol specification)
 19 or https://samba.org/samba/PFIF/                   19 or https://samba.org/samba/PFIF/
 20 for more details.                                  20 for more details.
 21                                                    21 
 22                                                    22 
 23 For questions or bug reports please contact:       23 For questions or bug reports please contact:
 24                                                    24 
 25     smfrench@gmail.com                             25     smfrench@gmail.com
 26                                                    26 
 27 See the project page at: https://wiki.samba.or     27 See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
 28                                                    28 
 29 Build instructions                                 29 Build instructions
 30 ==================                                 30 ==================
 31                                                    31 
 32 For Linux:                                         32 For Linux:
 33                                                    33 
 34 1) Download the kernel (e.g. from https://www.     34 1) Download the kernel (e.g. from https://www.kernel.org)
 35    and change directory into the top of the ke     35    and change directory into the top of the kernel directory tree
 36    (e.g. /usr/src/linux-2.5.73)                    36    (e.g. /usr/src/linux-2.5.73)
 37 2) make menuconfig (or make xconfig)               37 2) make menuconfig (or make xconfig)
 38 3) select cifs from within the network filesys     38 3) select cifs from within the network filesystem choices
 39 4) save and exit                                   39 4) save and exit
 40 5) make                                            40 5) make
 41                                                    41 
 42                                                    42 
 43 Installation instructions                          43 Installation instructions
 44 =========================                          44 =========================
 45                                                    45 
 46 If you have built the CIFS vfs as module (succ     46 If you have built the CIFS vfs as module (successfully) simply
 47 type ``make modules_install`` (or if you prefe     47 type ``make modules_install`` (or if you prefer, manually copy the file to
 48 the modules directory e.g. /lib/modules/6.3.0-     48 the modules directory e.g. /lib/modules/6.3.0-060300-generic/kernel/fs/smb/client/cifs.ko).
 49                                                    49 
 50 If you have built the CIFS vfs into the kernel     50 If you have built the CIFS vfs into the kernel itself, follow the instructions
 51 for your distribution on how to install a new      51 for your distribution on how to install a new kernel (usually you
 52 would simply type ``make install``).               52 would simply type ``make install``).
 53                                                    53 
 54 If you do not have the utility mount.cifs (in      54 If you do not have the utility mount.cifs (in the Samba 4.x source tree and on
 55 the CIFS VFS web site) copy it to the same dir     55 the CIFS VFS web site) copy it to the same directory in which mount helpers
 56 reside (usually /sbin).  Although the helper s     56 reside (usually /sbin).  Although the helper software is not
 57 required, mount.cifs is recommended.  Most dis     57 required, mount.cifs is recommended.  Most distros include a ``cifs-utils``
 58 package that includes this utility so it is re     58 package that includes this utility so it is recommended to install this.
 59                                                    59 
 60 Note that running the Winbind pam/nss module (     60 Note that running the Winbind pam/nss module (logon service) on all of your
 61 Linux clients is useful in mapping Uids and Gi     61 Linux clients is useful in mapping Uids and Gids consistently across the
 62 domain to the proper network user.  The mount.     62 domain to the proper network user.  The mount.cifs mount helper can be
 63 found at cifs-utils.git on git.samba.org           63 found at cifs-utils.git on git.samba.org
 64                                                    64 
 65 If cifs is built as a module, then the size an     65 If cifs is built as a module, then the size and number of network buffers
 66 and maximum number of simultaneous requests to     66 and maximum number of simultaneous requests to one server can be configured.
 67 Changing these from their defaults is not reco     67 Changing these from their defaults is not recommended. By executing modinfo::
 68                                                    68 
 69         modinfo <path to cifs.ko>                  69         modinfo <path to cifs.ko>
 70                                                    70 
 71 on kernel/fs/smb/client/cifs.ko the list of co     71 on kernel/fs/smb/client/cifs.ko the list of configuration changes that can be made
 72 at module initialization time (by running insm     72 at module initialization time (by running insmod cifs.ko) can be seen.
 73                                                    73 
 74 Recommendations                                    74 Recommendations
 75 ===============                                    75 ===============
 76                                                    76 
 77 To improve security the SMB2.1 dialect or late     77 To improve security the SMB2.1 dialect or later (usually will get SMB3.1.1) is now
 78 the new default. To use old dialects (e.g. to      78 the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0"
 79 on mount (or vers=2.0 for Windows Vista).  Not     79 on mount (or vers=2.0 for Windows Vista).  Note that the CIFS (vers=1.0) is
 80 much older and less secure than the default di     80 much older and less secure than the default dialect SMB3 which includes
 81 many advanced security features such as downgr     81 many advanced security features such as downgrade attack detection
 82 and encrypted shares and stronger signing and      82 and encrypted shares and stronger signing and authentication algorithms.
 83 There are additional mount options that may be     83 There are additional mount options that may be helpful for SMB3 to get
 84 improved POSIX behavior (NB: can use vers=3 to     84 improved POSIX behavior (NB: can use vers=3 to force SMB3 or later, never 2.1):
 85                                                    85 
 86    ``mfsymlinks`` and either ``cifsacl`` or ``     86    ``mfsymlinks`` and either ``cifsacl`` or ``modefromsid`` (usually with ``idsfromsid``)
 87                                                    87 
 88 Allowing User Mounts                               88 Allowing User Mounts
 89 ====================                               89 ====================
 90                                                    90 
 91 To permit users to mount and unmount over dire     91 To permit users to mount and unmount over directories they own is possible
 92 with the cifs vfs.  A way to enable such mount     92 with the cifs vfs.  A way to enable such mounting is to mark the mount.cifs
 93 utility as suid (e.g. ``chmod +s /sbin/mount.c     93 utility as suid (e.g. ``chmod +s /sbin/mount.cifs``). To enable users to
 94 umount shares they mount requires                  94 umount shares they mount requires
 95                                                    95 
 96 1) mount.cifs version 1.4 or later                 96 1) mount.cifs version 1.4 or later
 97 2) an entry for the share in /etc/fstab indica     97 2) an entry for the share in /etc/fstab indicating that a user may
 98    unmount it e.g.::                               98    unmount it e.g.::
 99                                                    99 
100      //server/usersharename  /mnt/username cif    100      //server/usersharename  /mnt/username cifs user 0 0
101                                                   101 
102 Note that when the mount.cifs utility is run s    102 Note that when the mount.cifs utility is run suid (allowing user mounts),
103 in order to reduce risks, the ``nosuid`` mount    103 in order to reduce risks, the ``nosuid`` mount flag is passed in on mount to
104 disallow execution of an suid program mounted     104 disallow execution of an suid program mounted on the remote target.
105 When mount is executed as root, nosuid is not     105 When mount is executed as root, nosuid is not passed in by default,
106 and execution of suid programs on the remote t    106 and execution of suid programs on the remote target would be enabled
107 by default. This can be changed, as with nfs a    107 by default. This can be changed, as with nfs and other filesystems,
108 by simply specifying ``nosuid`` among the moun    108 by simply specifying ``nosuid`` among the mount options. For user mounts
109 though to be able to pass the suid flag to mou    109 though to be able to pass the suid flag to mount requires rebuilding
110 mount.cifs with the following flag: CIFS_ALLOW    110 mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
111                                                   111 
112 There is a corresponding manual page for cifs     112 There is a corresponding manual page for cifs mounting in the Samba 3.0 and
113 later source tree in docs/manpages/mount.cifs.    113 later source tree in docs/manpages/mount.cifs.8
114                                                   114 
115 Allowing User Unmounts                            115 Allowing User Unmounts
116 ======================                            116 ======================
117                                                   117 
118 To permit users to unmount directories that th    118 To permit users to unmount directories that they have user mounted (see above),
119 the utility umount.cifs may be used.  It may b    119 the utility umount.cifs may be used.  It may be invoked directly, or if
120 umount.cifs is placed in /sbin, umount can inv    120 umount.cifs is placed in /sbin, umount can invoke the cifs umount helper
121 (at least for most versions of the umount util    121 (at least for most versions of the umount utility) for umount of cifs
122 mounts, unless umount is invoked with -i (whic    122 mounts, unless umount is invoked with -i (which will avoid invoking a umount
123 helper). As with mount.cifs, to enable user un    123 helper). As with mount.cifs, to enable user unmounts umount.cifs must be marked
124 as suid (e.g. ``chmod +s /sbin/umount.cifs``)     124 as suid (e.g. ``chmod +s /sbin/umount.cifs``) or equivalent (some distributions
125 allow adding entries to a file to the /etc/per    125 allow adding entries to a file to the /etc/permissions file to achieve the
126 equivalent suid effect).  For this utility to     126 equivalent suid effect).  For this utility to succeed the target path
127 must be a cifs mount, and the uid of the curre    127 must be a cifs mount, and the uid of the current user must match the uid
128 of the user who mounted the resource.             128 of the user who mounted the resource.
129                                                   129 
130 Also note that the customary way of allowing u    130 Also note that the customary way of allowing user mounts and unmounts is
131 (instead of using mount.cifs and unmount.cifs     131 (instead of using mount.cifs and unmount.cifs as suid) to add a line
132 to the file /etc/fstab for each //server/share    132 to the file /etc/fstab for each //server/share you wish to mount, but
133 this can become unwieldy when potential mount     133 this can become unwieldy when potential mount targets include many
134 or  unpredictable UNC names.                      134 or  unpredictable UNC names.
135                                                   135 
136 Samba Considerations                              136 Samba Considerations
137 ====================                              137 ====================
138                                                   138 
139 Most current servers support SMB2.1 and SMB3 w    139 Most current servers support SMB2.1 and SMB3 which are more secure,
140 but there are useful protocol extensions for t    140 but there are useful protocol extensions for the older less secure CIFS
141 dialect, so to get the maximum benefit if moun    141 dialect, so to get the maximum benefit if mounting using the older dialect
142 (CIFS/SMB1), we recommend using a server that     142 (CIFS/SMB1), we recommend using a server that supports the SNIA CIFS
143 Unix Extensions standard (e.g. almost any  ver    143 Unix Extensions standard (e.g. almost any  version of Samba ie version
144 2.2.5 or later) but the CIFS vfs works fine wi    144 2.2.5 or later) but the CIFS vfs works fine with a wide variety of CIFS servers.
145 Note that uid, gid and file permissions will d    145 Note that uid, gid and file permissions will display default values if you do
146 not have a server that supports the Unix exten    146 not have a server that supports the Unix extensions for CIFS (such as Samba
147 2.2.5 or later).  To enable the Unix CIFS Exte    147 2.2.5 or later).  To enable the Unix CIFS Extensions in the Samba server, add
148 the line::                                        148 the line::
149                                                   149 
150         unix extensions = yes                     150         unix extensions = yes
151                                                   151 
152 to your smb.conf file on the server.  Note tha    152 to your smb.conf file on the server.  Note that the following smb.conf settings
153 are also useful (on the Samba server) when the    153 are also useful (on the Samba server) when the majority of clients are Unix or
154 Linux::                                           154 Linux::
155                                                   155 
156         case sensitive = yes                      156         case sensitive = yes
157         delete readonly = yes                     157         delete readonly = yes
158         ea support = yes                          158         ea support = yes
159                                                   159 
160 Note that server ea support is required for su    160 Note that server ea support is required for supporting xattrs from the Linux
161 cifs client, and that EA support is present in    161 cifs client, and that EA support is present in later versions of Samba (e.g.
162 3.0.6 and later (also EA support works in all     162 3.0.6 and later (also EA support works in all versions of Windows, at least to
163 shares on NTFS filesystems).  Extended Attribu    163 shares on NTFS filesystems).  Extended Attribute (xattr) support is an optional
164 feature of most Linux filesystems which may re    164 feature of most Linux filesystems which may require enabling via
165 make menuconfig. Client support for extended a    165 make menuconfig. Client support for extended attributes (user xattr) can be
166 disabled on a per-mount basis by specifying ``    166 disabled on a per-mount basis by specifying ``nouser_xattr`` on mount.
167                                                   167 
168 The CIFS client can get and set POSIX ACLs (ge    168 The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
169 version 3.10 and later.  Setting POSIX ACLs re    169 version 3.10 and later.  Setting POSIX ACLs requires enabling both XATTR and
170 then POSIX support in the CIFS configuration o    170 then POSIX support in the CIFS configuration options when building the cifs
171 module.  POSIX ACL support can be disabled on     171 module.  POSIX ACL support can be disabled on a per mount basic by specifying
172 ``noacl`` on mount.                               172 ``noacl`` on mount.
173                                                   173 
174 Some administrators may want to change Samba's    174 Some administrators may want to change Samba's smb.conf ``map archive`` and
175 ``create mask`` parameters from the default.      175 ``create mask`` parameters from the default.  Unless the create mask is changed
176 newly created files can end up with an unneces    176 newly created files can end up with an unnecessarily restrictive default mode,
177 which may not be what you want, although if th    177 which may not be what you want, although if the CIFS Unix extensions are
178 enabled on the server and client, subsequent s    178 enabled on the server and client, subsequent setattr calls (e.g. chmod) can
179 fix the mode.  Note that creating special devi    179 fix the mode.  Note that creating special devices (mknod) remotely
180 may require specifying a mkdev function to Sam    180 may require specifying a mkdev function to Samba if you are not using
181 Samba 3.0.6 or later.  For more information on    181 Samba 3.0.6 or later.  For more information on these see the manual pages
182 (``man smb.conf``) on the Samba server system.    182 (``man smb.conf``) on the Samba server system.  Note that the cifs vfs,
183 unlike the smbfs vfs, does not read the smb.co    183 unlike the smbfs vfs, does not read the smb.conf on the client system
184 (the few optional settings are passed in on mo    184 (the few optional settings are passed in on mount via -o parameters instead).
185 Note that Samba 2.2.7 or later includes a fix     185 Note that Samba 2.2.7 or later includes a fix that allows the CIFS VFS to delete
186 open files (required for strict POSIX complian    186 open files (required for strict POSIX compliance).  Windows Servers already
187 supported this feature. Samba server does not     187 supported this feature. Samba server does not allow symlinks that refer to files
188 outside of the share, so in Samba versions pri    188 outside of the share, so in Samba versions prior to 3.0.6, most symlinks to
189 files with absolute paths (ie beginning with s    189 files with absolute paths (ie beginning with slash) such as::
190                                                   190 
191          ln -s /mnt/foo bar                       191          ln -s /mnt/foo bar
192                                                   192 
193 would be forbidden. Samba 3.0.6 server or late    193 would be forbidden. Samba 3.0.6 server or later includes the ability to create
194 such symlinks safely by converting unsafe syml    194 such symlinks safely by converting unsafe symlinks (ie symlinks to server
195 files that are outside of the share) to a samb    195 files that are outside of the share) to a samba specific format on the server
196 that is ignored by local server applications a    196 that is ignored by local server applications and non-cifs clients and that will
197 not be traversed by the Samba server).  This i    197 not be traversed by the Samba server).  This is opaque to the Linux client
198 application using the cifs vfs. Absolute symli    198 application using the cifs vfs. Absolute symlinks will work to Samba 3.0.5 or
199 later, but only for remote clients using the C    199 later, but only for remote clients using the CIFS Unix extensions, and will
200 be invisible to Windows clients and typically     200 be invisible to Windows clients and typically will not affect local
201 applications running on the same server as Sam    201 applications running on the same server as Samba.
202                                                   202 
203 Use instructions                                  203 Use instructions
204 ================                                  204 ================
205                                                   205 
206 Once the CIFS VFS support is built into the ke    206 Once the CIFS VFS support is built into the kernel or installed as a module
207 (cifs.ko), you can use mount syntax like the f    207 (cifs.ko), you can use mount syntax like the following to access Samba or
208 Mac or Windows servers::                          208 Mac or Windows servers::
209                                                   209 
210   mount -t cifs //9.53.216.11/e$ /mnt -o usern    210   mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword
211                                                   211 
212 Before -o the option -v may be specified to ma    212 Before -o the option -v may be specified to make the mount.cifs
213 mount helper display the mount steps more verb    213 mount helper display the mount steps more verbosely.
214 After -o the following commonly used cifs vfs     214 After -o the following commonly used cifs vfs specific options
215 are supported::                                   215 are supported::
216                                                   216 
217   username=<username>                             217   username=<username>
218   password=<password>                             218   password=<password>
219   domain=<domain name>                            219   domain=<domain name>
220                                                   220 
221 Other cifs mount options are described below.     221 Other cifs mount options are described below.  Use of TCP names (in addition to
222 ip addresses) is available if the mount helper    222 ip addresses) is available if the mount helper (mount.cifs) is installed. If
223 you do not trust the server to which are mount    223 you do not trust the server to which are mounted, or if you do not have
224 cifs signing enabled (and the physical network    224 cifs signing enabled (and the physical network is insecure), consider use
225 of the standard mount options ``noexec`` and `    225 of the standard mount options ``noexec`` and ``nosuid`` to reduce the risk of
226 running an altered binary on your local system    226 running an altered binary on your local system (downloaded from a hostile server
227 or altered by a hostile router).                  227 or altered by a hostile router).
228                                                   228 
229 Although mounting using format corresponding t    229 Although mounting using format corresponding to the CIFS URL specification is
230 not possible in mount.cifs yet, it is possible    230 not possible in mount.cifs yet, it is possible to use an alternate format
231 for the server and sharename (which is somewha    231 for the server and sharename (which is somewhat similar to NFS style mount
232 syntax) instead of the more widely used UNC fo    232 syntax) instead of the more widely used UNC format (i.e. \\server\share)::
233                                                   233 
234   mount -t cifs tcp_name_of_server:share_name     234   mount -t cifs tcp_name_of_server:share_name /mnt -o user=myname,pass=mypasswd
235                                                   235 
236 When using the mount helper mount.cifs, passwo    236 When using the mount helper mount.cifs, passwords may be specified via alternate
237 mechanisms, instead of specifying it after -o     237 mechanisms, instead of specifying it after -o using the normal ``pass=`` syntax
238 on the command line:                              238 on the command line:
239 1) By including it in a credential file. Speci    239 1) By including it in a credential file. Specify credentials=filename as one
240 of the mount options. Credential files contain    240 of the mount options. Credential files contain two lines::
241                                                   241 
242         username=someuser                         242         username=someuser
243         password=your_password                    243         password=your_password
244                                                   244 
245 2) By specifying the password in the PASSWD en    245 2) By specifying the password in the PASSWD environment variable (similarly
246    the user name can be taken from the USER en    246    the user name can be taken from the USER environment variable).
247 3) By specifying the password in a file by nam    247 3) By specifying the password in a file by name via PASSWD_FILE
248 4) By specifying the password in a file by fil    248 4) By specifying the password in a file by file descriptor via PASSWD_FD
249                                                   249 
250 If no password is provided, mount.cifs will pr    250 If no password is provided, mount.cifs will prompt for password entry
251                                                   251 
252 Restrictions                                      252 Restrictions
253 ============                                      253 ============
254                                                   254 
255 Servers must support either "pure-TCP" (port 4    255 Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC
256 1001/1002 support for "Netbios-Over-TCP/IP." T    256 1001/1002 support for "Netbios-Over-TCP/IP." This is not likely to be a
257 problem as most servers support this.             257 problem as most servers support this.
258                                                   258 
259 Valid filenames differ between Windows and Lin    259 Valid filenames differ between Windows and Linux.  Windows typically restricts
260 filenames which contain certain reserved chara    260 filenames which contain certain reserved characters (e.g.the character :
261 which is used to delimit the beginning of a st    261 which is used to delimit the beginning of a stream name by Windows), while
262 Linux allows a slightly wider set of valid cha    262 Linux allows a slightly wider set of valid characters in filenames. Windows
263 servers can remap such characters when an expl    263 servers can remap such characters when an explicit mapping is specified in
264 the Server's registry.  Samba starting with ve    264 the Server's registry.  Samba starting with version 3.10 will allow such
265 filenames (ie those which contain valid Linux     265 filenames (ie those which contain valid Linux characters, which normally
266 would be forbidden for Windows/CIFS semantics)    266 would be forbidden for Windows/CIFS semantics) as long as the server is
267 configured for Unix Extensions (and the client    267 configured for Unix Extensions (and the client has not disabled
268 /proc/fs/cifs/LinuxExtensionsEnabled). In addi    268 /proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
269 ``mapposix`` can be used on CIFS (vers=1.0) to    269 ``mapposix`` can be used on CIFS (vers=1.0) to force the mapping of
270 illegal Windows/NTFS/SMB characters to a remap    270 illegal Windows/NTFS/SMB characters to a remap range (this mount parameter
271 is the default for SMB3). This remap (``mappos    271 is the default for SMB3). This remap (``mapposix``) range is also
272 compatible with Mac (and "Services for Mac" on    272 compatible with Mac (and "Services for Mac" on some older Windows).
273                                                   273 
274 CIFS VFS Mount Options                            274 CIFS VFS Mount Options
275 ======================                            275 ======================
276 A partial list of the supported mount options     276 A partial list of the supported mount options follows:
277                                                   277 
278   username                                        278   username
279                 The user name to use when tryi    279                 The user name to use when trying to establish
280                 the CIFS session.                 280                 the CIFS session.
281   password                                        281   password
282                 The user password.  If the mou    282                 The user password.  If the mount helper is
283                 installed, the user will be pr    283                 installed, the user will be prompted for password
284                 if not supplied.                  284                 if not supplied.
285   ip                                              285   ip
286                 The ip address of the target s    286                 The ip address of the target server
287   unc                                             287   unc
288                 The target server Universal Ne    288                 The target server Universal Network Name (export) to
289                 mount.                            289                 mount.
290   domain                                          290   domain
291                 Set the SMB/CIFS workgroup nam    291                 Set the SMB/CIFS workgroup name prepended to the
292                 username during CIFS session e    292                 username during CIFS session establishment
293   forceuid                                        293   forceuid
294                 Set the default uid for inodes    294                 Set the default uid for inodes to the uid
295                 passed in on mount. For mounts    295                 passed in on mount. For mounts to servers
296                 which do support the CIFS Unix    296                 which do support the CIFS Unix extensions, such as a
297                 properly configured Samba serv    297                 properly configured Samba server, the server provides
298                 the uid, gid and mode so this     298                 the uid, gid and mode so this parameter should not be
299                 specified unless the server an    299                 specified unless the server and clients uid and gid
300                 numbering differ.  If the serv    300                 numbering differ.  If the server and client are in the
301                 same domain (e.g. running winb    301                 same domain (e.g. running winbind or nss_ldap) and
302                 the server supports the Unix E    302                 the server supports the Unix Extensions then the uid
303                 and gid can be retrieved from     303                 and gid can be retrieved from the server (and uid
304                 and gid would not have to be s    304                 and gid would not have to be specified on the mount.
305                 For servers which do not suppo    305                 For servers which do not support the CIFS Unix
306                 extensions, the default uid (a    306                 extensions, the default uid (and gid) returned on lookup
307                 of existing files will be the     307                 of existing files will be the uid (gid) of the person
308                 who executed the mount (root,     308                 who executed the mount (root, except when mount.cifs
309                 is configured setuid for user     309                 is configured setuid for user mounts) unless the ``uid=``
310                 (gid) mount option is specifie    310                 (gid) mount option is specified. Also note that permission
311                 checks (authorization checks)     311                 checks (authorization checks) on accesses to a file occur
312                 at the server, but there are c    312                 at the server, but there are cases in which an administrator
313                 may want to restrict at the cl    313                 may want to restrict at the client as well.  For those
314                 servers which do not report a     314                 servers which do not report a uid/gid owner
315                 (such as Windows), permissions    315                 (such as Windows), permissions can also be checked at the
316                 client, and a crude form of cl    316                 client, and a crude form of client side permission checking
317                 can be enabled by specifying f    317                 can be enabled by specifying file_mode and dir_mode on
318                 the client.  (default)            318                 the client.  (default)
319   forcegid                                        319   forcegid
320                 (similar to above but for the     320                 (similar to above but for the groupid instead of uid) (default)
321   noforceuid                                      321   noforceuid
322                 Fill in file owner information    322                 Fill in file owner information (uid) by requesting it from
323                 the server if possible. With t    323                 the server if possible. With this option, the value given in
324                 the uid= option (on mount) wil    324                 the uid= option (on mount) will only be used if the server
325                 can not support returning uids    325                 can not support returning uids on inodes.
326   noforcegid                                      326   noforcegid
327                 (similar to above but for the     327                 (similar to above but for the group owner, gid, instead of uid)
328   uid                                             328   uid
329                 Set the default uid for inodes    329                 Set the default uid for inodes, and indicate to the
330                 cifs kernel driver which local    330                 cifs kernel driver which local user mounted. If the server
331                 supports the unix extensions t    331                 supports the unix extensions the default uid is
332                 not used to fill in the owner     332                 not used to fill in the owner fields of inodes (files)
333                 unless the ``forceuid`` parame    333                 unless the ``forceuid`` parameter is specified.
334   gid                                             334   gid
335                 Set the default gid for inodes    335                 Set the default gid for inodes (similar to above).
336   file_mode                                       336   file_mode
337                 If CIFS Unix extensions are no    337                 If CIFS Unix extensions are not supported by the server
338                 this overrides the default mod    338                 this overrides the default mode for file inodes.
339   fsc                                             339   fsc
340                 Enable local disk caching usin    340                 Enable local disk caching using FS-Cache (off by default). This
341                 option could be useful to impr    341                 option could be useful to improve performance on a slow link,
342                 heavily loaded server and/or n    342                 heavily loaded server and/or network where reading from the
343                 disk is faster than reading fr    343                 disk is faster than reading from the server (over the network).
344                 This could also impact scalabi    344                 This could also impact scalability positively as the
345                 number of calls to the server     345                 number of calls to the server are reduced. However, local
346                 caching is not suitable for al    346                 caching is not suitable for all workloads for e.g. read-once
347                 type workloads. So, you need t    347                 type workloads. So, you need to consider carefully your
348                 workload/scenario before using    348                 workload/scenario before using this option. Currently, local
349                 disk caching is functional for    349                 disk caching is functional for CIFS files opened as read-only.
350   dir_mode                                        350   dir_mode
351                 If CIFS Unix extensions are no    351                 If CIFS Unix extensions are not supported by the server
352                 this overrides the default mod    352                 this overrides the default mode for directory inodes.
353   port                                            353   port
354                 attempt to contact the server     354                 attempt to contact the server on this tcp port, before
355                 trying the usual ports (port 4    355                 trying the usual ports (port 445, then 139).
356   iocharset                                       356   iocharset
357                 Codepage used to convert local    357                 Codepage used to convert local path names to and from
358                 Unicode. Unicode is used by de    358                 Unicode. Unicode is used by default for network path
359                 names if the server supports i    359                 names if the server supports it.  If iocharset is
360                 not specified then the nls_def    360                 not specified then the nls_default specified
361                 during the local client kernel    361                 during the local client kernel build will be used.
362                 If server does not support Uni    362                 If server does not support Unicode, this parameter is
363                 unused.                           363                 unused.
364   rsize                                           364   rsize
365                 default read size (usually 16K    365                 default read size (usually 16K). The client currently
366                 can not use rsize larger than     366                 can not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize
367                 defaults to 16K and may be cha    367                 defaults to 16K and may be changed (from 8K to the maximum
368                 kmalloc size allowed by your k    368                 kmalloc size allowed by your kernel) at module install time
369                 for cifs.ko. Setting CIFSMaxBu    369                 for cifs.ko. Setting CIFSMaxBufSize to a very large value
370                 will cause cifs to use more me    370                 will cause cifs to use more memory and may reduce performance
371                 in some cases.  To use rsize g    371                 in some cases.  To use rsize greater than 127K (the original
372                 cifs protocol maximum) also re    372                 cifs protocol maximum) also requires that the server support
373                 a new Unix Capability flag (fo    373                 a new Unix Capability flag (for very large read) which some
374                 newer servers (e.g. Samba 3.0.    374                 newer servers (e.g. Samba 3.0.26 or later) do. rsize can be
375                 set from a minimum of 2048 to     375                 set from a minimum of 2048 to a maximum of 130048 (127K or
376                 CIFSMaxBufSize, whichever is s    376                 CIFSMaxBufSize, whichever is smaller)
377   wsize                                           377   wsize
378                 default write size (default 57    378                 default write size (default 57344)
379                 maximum wsize currently allowe    379                 maximum wsize currently allowed by CIFS is 57344 (fourteen
380                 4096 byte pages)                  380                 4096 byte pages)
381   actimeo=n                                       381   actimeo=n
382                 attribute cache timeout in sec    382                 attribute cache timeout in seconds (default 1 second).
383                 After this timeout, the cifs c    383                 After this timeout, the cifs client requests fresh attribute
384                 information from the server. T    384                 information from the server. This option allows to tune the
385                 attribute cache timeout to sui    385                 attribute cache timeout to suit the workload needs. Shorter
386                 timeouts mean better the cache    386                 timeouts mean better the cache coherency, but increased number
387                 of calls to the server. Longer    387                 of calls to the server. Longer timeouts mean reduced number
388                 of calls to the server at the     388                 of calls to the server at the expense of less stricter cache
389                 coherency checks (i.e. incorre    389                 coherency checks (i.e. incorrect attribute cache for a short
390                 period of time).                  390                 period of time).
391   rw                                              391   rw
392                 mount the network share read-w    392                 mount the network share read-write (note that the
393                 server may still consider the     393                 server may still consider the share read-only)
394   ro                                              394   ro
395                 mount network share read-only     395                 mount network share read-only
396   version                                         396   version
397                 used to distinguish different     397                 used to distinguish different versions of the
398                 mount helper utility (not typi    398                 mount helper utility (not typically needed)
399   sep                                             399   sep
400                 if first mount option (after t    400                 if first mount option (after the -o), overrides
401                 the comma as the separator bet    401                 the comma as the separator between the mount
402                 parameters. e.g.::                402                 parameters. e.g.::
403                                                   403 
404                         -o user=myname,passwor    404                         -o user=myname,password=mypassword,domain=mydom
405                                                   405 
406                 could be passed instead with p    406                 could be passed instead with period as the separator by::
407                                                   407 
408                         -o sep=.user=myname.pa    408                         -o sep=.user=myname.password=mypassword.domain=mydom
409                                                   409 
410                 this might be useful when comm    410                 this might be useful when comma is contained within username
411                 or password or domain. This op    411                 or password or domain. This option is less important
412                 when the cifs mount helper cif    412                 when the cifs mount helper cifs.mount (version 1.1 or later)
413                 is used.                          413                 is used.
414   nosuid                                          414   nosuid
415                 Do not allow remote executable    415                 Do not allow remote executables with the suid bit
416                 program to be executed.  This     416                 program to be executed.  This is only meaningful for mounts
417                 to servers such as Samba which    417                 to servers such as Samba which support the CIFS Unix Extensions.
418                 If you do not trust the server    418                 If you do not trust the servers in your network (your mount
419                 targets) it is recommended tha    419                 targets) it is recommended that you specify this option for
420                 greater security.                 420                 greater security.
421   exec                                            421   exec
422                 Permit execution of binaries o    422                 Permit execution of binaries on the mount.
423   noexec                                          423   noexec
424                 Do not permit execution of bin    424                 Do not permit execution of binaries on the mount.
425   dev                                             425   dev
426                 Recognize block devices on the    426                 Recognize block devices on the remote mount.
427   nodev                                           427   nodev
428                 Do not recognize devices on th    428                 Do not recognize devices on the remote mount.
429   suid                                            429   suid
430                 Allow remote files on this mou    430                 Allow remote files on this mountpoint with suid enabled to
431                 be executed (default for mount    431                 be executed (default for mounts when executed as root,
432                 nosuid is default for user mou    432                 nosuid is default for user mounts).
433   credentials                                     433   credentials
434                 Although ignored by the cifs k    434                 Although ignored by the cifs kernel component, it is used by
435                 the mount helper, mount.cifs.     435                 the mount helper, mount.cifs. When mount.cifs is installed it
436                 opens and reads the credential    436                 opens and reads the credential file specified in order
437                 to obtain the userid and passw    437                 to obtain the userid and password arguments which are passed to
438                 the cifs vfs.                     438                 the cifs vfs.
439   guest                                           439   guest
440                 Although ignored by the kernel    440                 Although ignored by the kernel component, the mount.cifs
441                 mount helper will not prompt t    441                 mount helper will not prompt the user for a password
442                 if guest is specified on the m    442                 if guest is specified on the mount options.  If no
443                 password is specified a null p    443                 password is specified a null password will be used.
444   perm                                            444   perm
445                 Client does permission checks     445                 Client does permission checks (vfs_permission check of uid
446                 and gid of the file against th    446                 and gid of the file against the mode and desired operation),
447                 Note that this is in addition     447                 Note that this is in addition to the normal ACL check on the
448                 target machine done by the ser    448                 target machine done by the server software.
449                 Client permission checking is     449                 Client permission checking is enabled by default.
450   noperm                                          450   noperm
451                 Client does not do permission     451                 Client does not do permission checks.  This can expose
452                 files on this mount to access     452                 files on this mount to access by other users on the local
453                 client system. It is typically    453                 client system. It is typically only needed when the server
454                 supports the CIFS Unix Extensi    454                 supports the CIFS Unix Extensions but the UIDs/GIDs on the
455                 client and server system do no    455                 client and server system do not match closely enough to allow
456                 access by the user doing the m    456                 access by the user doing the mount, but it may be useful with
457                 non CIFS Unix Extension mounts    457                 non CIFS Unix Extension mounts for cases in which the default
458                 mode is specified on the mount    458                 mode is specified on the mount but is not to be enforced on the
459                 client (e.g. perhaps when Mult    459                 client (e.g. perhaps when MultiUserMount is enabled)
460                 Note that this does not affect    460                 Note that this does not affect the normal ACL check on the
461                 target machine done by the ser    461                 target machine done by the server software (of the server
462                 ACL against the user name prov    462                 ACL against the user name provided at mount time).
463   serverino                                       463   serverino
464                 Use server's inode numbers ins    464                 Use server's inode numbers instead of generating automatically
465                 incrementing inode numbers on     465                 incrementing inode numbers on the client.  Although this will
466                 make it easier to spot hardlin    466                 make it easier to spot hardlinked files (as they will have
467                 the same inode numbers) and in    467                 the same inode numbers) and inode numbers may be persistent,
468                 note that the server does not     468                 note that the server does not guarantee that the inode numbers
469                 are unique if multiple server     469                 are unique if multiple server side mounts are exported under a
470                 single share (since inode numb    470                 single share (since inode numbers on the servers might not
471                 be unique if multiple filesyst    471                 be unique if multiple filesystems are mounted under the same
472                 shared higher level directory)    472                 shared higher level directory).  Note that some older
473                 (e.g. pre-Windows 2000) do not    473                 (e.g. pre-Windows 2000) do not support returning UniqueIDs
474                 or the CIFS Unix Extensions eq    474                 or the CIFS Unix Extensions equivalent and for those
475                 this mount option will have no    475                 this mount option will have no effect.  Exporting cifs mounts
476                 under nfsd requires this mount    476                 under nfsd requires this mount option on the cifs mount.
477                 This is now the default if ser    477                 This is now the default if server supports the
478                 required network operation.       478                 required network operation.
479   noserverino                                     479   noserverino
480                 Client generates inode numbers    480                 Client generates inode numbers (rather than using the actual one
481                 from the server). These inode     481                 from the server). These inode numbers will vary after
482                 unmount or reboot which can co    482                 unmount or reboot which can confuse some applications,
483                 but not all server filesystems    483                 but not all server filesystems support unique inode
484                 numbers.                          484                 numbers.
485   setuids                                         485   setuids
486                 If the CIFS Unix extensions ar    486                 If the CIFS Unix extensions are negotiated with the server
487                 the client will attempt to set    487                 the client will attempt to set the effective uid and gid of
488                 the local process on newly cre    488                 the local process on newly created files, directories, and
489                 devices (create, mkdir, mknod)    489                 devices (create, mkdir, mknod).  If the CIFS Unix Extensions
490                 are not negotiated, for newly     490                 are not negotiated, for newly created files and directories
491                 instead of using the default u    491                 instead of using the default uid and gid specified on
492                 the mount, cache the new file'    492                 the mount, cache the new file's uid and gid locally which means
493                 that the uid for the file can     493                 that the uid for the file can change when the inode is
494                 reloaded (or the user remounts    494                 reloaded (or the user remounts the share).
495   nosetuids                                       495   nosetuids
496                 The client will not attempt to    496                 The client will not attempt to set the uid and gid on
497                 on newly created files, direct    497                 on newly created files, directories, and devices (create,
498                 mkdir, mknod) which will resul    498                 mkdir, mknod) which will result in the server setting the
499                 uid and gid to the default (us    499                 uid and gid to the default (usually the server uid of the
500                 user who mounted the share).      500                 user who mounted the share).  Letting the server (rather than
501                 the client) set the uid and gi    501                 the client) set the uid and gid is the default. If the CIFS
502                 Unix Extensions are not negoti    502                 Unix Extensions are not negotiated then the uid and gid for
503                 new files will appear to be th    503                 new files will appear to be the uid (gid) of the mounter or the
504                 uid (gid) parameter specified     504                 uid (gid) parameter specified on the mount.
505   netbiosname                                     505   netbiosname
506                 When mounting to servers via p    506                 When mounting to servers via port 139, specifies the RFC1001
507                 source name to use to represen    507                 source name to use to represent the client netbios machine
508                 name when doing the RFC1001 ne    508                 name when doing the RFC1001 netbios session initialize.
509   direct                                          509   direct
510                 Do not do inode data caching o    510                 Do not do inode data caching on files opened on this mount.
511                 This precludes mmapping files     511                 This precludes mmapping files on this mount. In some cases
512                 with fast networks and little     512                 with fast networks and little or no caching benefits on the
513                 client (e.g. when the applicat    513                 client (e.g. when the application is doing large sequential
514                 reads bigger than page size wi    514                 reads bigger than page size without rereading the same data)
515                 this can provide better perfor    515                 this can provide better performance than the default
516                 behavior which caches reads (r    516                 behavior which caches reads (readahead) and writes
517                 (writebehind) through the loca    517                 (writebehind) through the local Linux client pagecache
518                 if oplock (caching token) is g    518                 if oplock (caching token) is granted and held. Note that
519                 direct allows write operations    519                 direct allows write operations larger than page size
520                 to be sent to the server.         520                 to be sent to the server.
521   strictcache                                     521   strictcache
522                 Use for switching on strict ca    522                 Use for switching on strict cache mode. In this mode the
523                 client read from the cache all    523                 client read from the cache all the time it has Oplock Level II,
524                 otherwise - read from the serv    524                 otherwise - read from the server. All written data are stored
525                 in the cache, but if the clien    525                 in the cache, but if the client doesn't have Exclusive Oplock,
526                 it writes the data to the serv    526                 it writes the data to the server.
527   rwpidforward                                    527   rwpidforward
528                 Forward pid of a process who o    528                 Forward pid of a process who opened a file to any read or write
529                 operation on that file. This p    529                 operation on that file. This prevent applications like WINE
530                 from failing on read and write    530                 from failing on read and write if we use mandatory brlock style.
531   acl                                             531   acl
532                 Allow setfacl and getfacl to m    532                 Allow setfacl and getfacl to manage posix ACLs if server
533                 supports them.  (default)         533                 supports them.  (default)
534   noacl                                           534   noacl
535                 Do not allow setfacl and getfa    535                 Do not allow setfacl and getfacl calls on this mount
536   user_xattr                                      536   user_xattr
537                 Allow getting and setting user    537                 Allow getting and setting user xattrs (those attributes whose
538                 name begins with ``user.`` or     538                 name begins with ``user.`` or ``os2.``) as OS/2 EAs (extended
539                 attributes) to the server.  Th    539                 attributes) to the server.  This allows support of the
540                 setfattr and getfattr utilitie    540                 setfattr and getfattr utilities. (default)
541   nouser_xattr                                    541   nouser_xattr
542                 Do not allow getfattr/setfattr    542                 Do not allow getfattr/setfattr to get/set/list xattrs
543   mapchars                                        543   mapchars
544                 Translate six of the seven res    544                 Translate six of the seven reserved characters (not backslash)::
545                                                   545 
546                         *?<>|:                    546                         *?<>|:
547                                                   547 
548                 to the remap range (above 0xF0    548                 to the remap range (above 0xF000), which also
549                 allows the CIFS client to reco    549                 allows the CIFS client to recognize files created with
550                 such characters by Windows's P    550                 such characters by Windows's POSIX emulation. This can
551                 also be useful when mounting t    551                 also be useful when mounting to most versions of Samba
552                 (which also forbids creating a    552                 (which also forbids creating and opening files
553                 whose names contain any of the    553                 whose names contain any of these seven characters).
554                 This has no effect if the serv    554                 This has no effect if the server does not support
555                 Unicode on the wire.              555                 Unicode on the wire.
556   nomapchars                                      556   nomapchars
557                 Do not translate any of these     557                 Do not translate any of these seven characters (default).
558   nocase                                          558   nocase
559                 Request case insensitive path     559                 Request case insensitive path name matching (case
560                 sensitive is the default if th    560                 sensitive is the default if the server supports it).
561                 (mount option ``ignorecase`` i    561                 (mount option ``ignorecase`` is identical to ``nocase``)
562   posixpaths                                      562   posixpaths
563                 If CIFS Unix extensions are su    563                 If CIFS Unix extensions are supported, attempt to
564                 negotiate posix path name supp    564                 negotiate posix path name support which allows certain
565                 characters forbidden in typica    565                 characters forbidden in typical CIFS filenames, without
566                 requiring remapping. (default)    566                 requiring remapping. (default)
567   noposixpaths                                    567   noposixpaths
568                 If CIFS Unix extensions are su    568                 If CIFS Unix extensions are supported, do not request
569                 posix path name support (this     569                 posix path name support (this may cause servers to
570                 reject creatingfile with certa    570                 reject creatingfile with certain reserved characters).
571   nounix                                          571   nounix
572                 Disable the CIFS Unix Extensio    572                 Disable the CIFS Unix Extensions for this mount (tree
573                 connection). This is rarely ne    573                 connection). This is rarely needed, but it may be useful
574                 in order to turn off multiple     574                 in order to turn off multiple settings all at once (ie
575                 posix acls, posix locks, posix    575                 posix acls, posix locks, posix paths, symlink support
576                 and retrieving uids/gids/mode     576                 and retrieving uids/gids/mode from the server) or to
577                 work around a bug in server wh    577                 work around a bug in server which implement the Unix
578                 Extensions.                       578                 Extensions.
579   nobrl                                           579   nobrl
580                 Do not send byte range lock re    580                 Do not send byte range lock requests to the server.
581                 This is necessary for certain     581                 This is necessary for certain applications that break
582                 with cifs style mandatory byte    582                 with cifs style mandatory byte range locks (and most
583                 cifs servers do not yet suppor    583                 cifs servers do not yet support requesting advisory
584                 byte range locks).                584                 byte range locks).
585   forcemandatorylock                              585   forcemandatorylock
586                 Even if the server supports po    586                 Even if the server supports posix (advisory) byte range
587                 locking, send only mandatory l    587                 locking, send only mandatory lock requests.  For some
588                 (presumably rare) applications    588                 (presumably rare) applications, originally coded for
589                 DOS/Windows, which require Win    589                 DOS/Windows, which require Windows style mandatory byte range
590                 locking, they may be able to t    590                 locking, they may be able to take advantage of this option,
591                 forcing the cifs client to onl    591                 forcing the cifs client to only send mandatory locks
592                 even if the cifs server would     592                 even if the cifs server would support posix advisory locks.
593                 ``forcemand`` is accepted as a    593                 ``forcemand`` is accepted as a shorter form of this mount
594                 option.                           594                 option.
595   nostrictsync                                    595   nostrictsync
596                 If this mount option is set, w    596                 If this mount option is set, when an application does an
597                 fsync call then the cifs clien    597                 fsync call then the cifs client does not send an SMB Flush
598                 to the server (to force the se    598                 to the server (to force the server to write all dirty data
599                 for this file immediately to d    599                 for this file immediately to disk), although cifs still sends
600                 all dirty (cached) file data t    600                 all dirty (cached) file data to the server and waits for the
601                 server to respond to the write    601                 server to respond to the write.  Since SMB Flush can be
602                 very slow, and some servers ma    602                 very slow, and some servers may be reliable enough (to risk
603                 delaying slightly flushing the    603                 delaying slightly flushing the data to disk on the server),
604                 turning on this option may be     604                 turning on this option may be useful to improve performance for
605                 applications that fsync too mu    605                 applications that fsync too much, at a small risk of server
606                 crash.  If this mount option i    606                 crash.  If this mount option is not set, by default cifs will
607                 send an SMB flush request (and    607                 send an SMB flush request (and wait for a response) on every
608                 fsync call.                       608                 fsync call.
609   nodfs                                           609   nodfs
610                 Disable DFS (global name space    610                 Disable DFS (global name space support) even if the
611                 server claims to support it.      611                 server claims to support it.  This can help work around
612                 a problem with parsing of DFS     612                 a problem with parsing of DFS paths with Samba server
613                 versions 3.0.24 and 3.0.25.       613                 versions 3.0.24 and 3.0.25.
614   remount                                         614   remount
615                 remount the share (often used     615                 remount the share (often used to change from ro to rw mounts
616                 or vice versa)                    616                 or vice versa)
617   cifsacl                                         617   cifsacl
618                 Report mode bits (e.g. on stat    618                 Report mode bits (e.g. on stat) based on the Windows ACL for
619                 the file. (EXPERIMENTAL)          619                 the file. (EXPERIMENTAL)
620   servern                                         620   servern
621                 Specify the server 's netbios     621                 Specify the server 's netbios name (RFC1001 name) to use
622                 when attempting to setup a ses    622                 when attempting to setup a session to the server.
623                 This is needed for mounting to    623                 This is needed for mounting to some older servers (such
624                 as OS/2 or Windows 98 and Wind    624                 as OS/2 or Windows 98 and Windows ME) since they do not
625                 support a default server name.    625                 support a default server name.  A server name can be up
626                 to 15 characters long and is u    626                 to 15 characters long and is usually uppercased.
627   sfu                                             627   sfu
628                 When the CIFS Unix Extensions     628                 When the CIFS Unix Extensions are not negotiated, attempt to
629                 create device files and fifos     629                 create device files and fifos in a format compatible with
630                 Services for Unix (SFU).  In a    630                 Services for Unix (SFU).  In addition retrieve bits 10-12
631                 of the mode via the SETFILEBIT    631                 of the mode via the SETFILEBITS extended attribute (as
632                 SFU does).  In the future the     632                 SFU does).  In the future the bottom 9 bits of the
633                 mode also will be emulated usi    633                 mode also will be emulated using queries of the security
634                 descriptor (ACL).                 634                 descriptor (ACL).
635   mfsymlinks                                      635   mfsymlinks
636                 Enable support for Minshall+Fr    636                 Enable support for Minshall+French symlinks
637                 (see http://wiki.samba.org/ind    637                 (see http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks)
638                 This option is ignored when sp    638                 This option is ignored when specified together with the
639                 'sfu' option. Minshall+French     639                 'sfu' option. Minshall+French symlinks are used even if
640                 the server supports the CIFS U    640                 the server supports the CIFS Unix Extensions.
641   sign                                            641   sign
642                 Must use packet signing (helps    642                 Must use packet signing (helps avoid unwanted data modification
643                 by intermediate systems in the    643                 by intermediate systems in the route).  Note that signing
644                 does not work with lanman or p    644                 does not work with lanman or plaintext authentication.
645   seal                                            645   seal
646                 Must seal (encrypt) all data o    646                 Must seal (encrypt) all data on this mounted share before
647                 sending on the network.  Requi    647                 sending on the network.  Requires support for Unix Extensions.
648                 Note that this differs from th    648                 Note that this differs from the sign mount option in that it
649                 causes encryption of data sent    649                 causes encryption of data sent over this mounted share but other
650                 shares mounted to the same ser    650                 shares mounted to the same server are unaffected.
651   locallease                                      651   locallease
652                 This option is rarely needed.     652                 This option is rarely needed. Fcntl F_SETLEASE is
653                 used by some applications such    653                 used by some applications such as Samba and NFSv4 server to
654                 check to see whether a file is    654                 check to see whether a file is cacheable.  CIFS has no way
655                 to explicitly request a lease,    655                 to explicitly request a lease, but can check whether a file
656                 is cacheable (oplocked).  Unfo    656                 is cacheable (oplocked).  Unfortunately, even if a file
657                 is not oplocked, it could stil    657                 is not oplocked, it could still be cacheable (ie cifs client
658                 could grant fcntl leases if no    658                 could grant fcntl leases if no other local processes are using
659                 the file) for cases for exampl    659                 the file) for cases for example such as when the server does not
660                 support oplocks and the user i    660                 support oplocks and the user is sure that the only updates to
661                 the file will be from this cli    661                 the file will be from this client. Specifying this mount option
662                 will allow the cifs client to     662                 will allow the cifs client to check for leases (only) locally
663                 for files which are not oplock    663                 for files which are not oplocked instead of denying leases
664                 in that case. (EXPERIMENTAL)      664                 in that case. (EXPERIMENTAL)
665   sec                                             665   sec
666                 Security mode.  Allowed values    666                 Security mode.  Allowed values are:
667                                                   667 
668                         none                      668                         none
669                                 attempt to con    669                                 attempt to connection as a null user (no name)
670                         krb5                      670                         krb5
671                                 Use Kerberos v    671                                 Use Kerberos version 5 authentication
672                         krb5i                     672                         krb5i
673                                 Use Kerberos a    673                                 Use Kerberos authentication and packet signing
674                         ntlm                      674                         ntlm
675                                 Use NTLM passw    675                                 Use NTLM password hashing (default)
676                         ntlmi                     676                         ntlmi
677                                 Use NTLM passw    677                                 Use NTLM password hashing with signing (if
678                                 /proc/fs/cifs/    678                                 /proc/fs/cifs/PacketSigningEnabled on or if
679                                 server require    679                                 server requires signing also can be the default)
680                         ntlmv2                    680                         ntlmv2
681                                 Use NTLMv2 pas    681                                 Use NTLMv2 password hashing
682                         ntlmv2i                   682                         ntlmv2i
683                                 Use NTLMv2 pas    683                                 Use NTLMv2 password hashing with packet signing
684                         lanman                    684                         lanman
685                                 (if configured    685                                 (if configured in kernel config) use older
686                                 lanman hash       686                                 lanman hash
687   hard                                            687   hard
688                 Retry file operations if serve    688                 Retry file operations if server is not responding
689   soft                                            689   soft
690                 Limit retries to unresponsive     690                 Limit retries to unresponsive servers (usually only
691                 one retry) before returning an    691                 one retry) before returning an error.  (default)
692                                                   692 
693 The mount.cifs mount helper also accepts a few    693 The mount.cifs mount helper also accepts a few mount options before -o
694 including:                                        694 including:
695                                                   695 
696 =============== ==============================    696 =============== ===============================================================
697         -S      take password from stdin (equi    697         -S      take password from stdin (equivalent to setting the environment
698                 variable ``PASSWD_FD=0``          698                 variable ``PASSWD_FD=0``
699         -V      print mount.cifs version          699         -V      print mount.cifs version
700         -?      display simple usage informati    700         -?      display simple usage information
701 =============== ==============================    701 =============== ===============================================================
702                                                   702 
703 With most 2.6 kernel versions of modutils, the    703 With most 2.6 kernel versions of modutils, the version of the cifs kernel
704 module can be displayed via modinfo.              704 module can be displayed via modinfo.
705                                                   705 
706 Misc /proc/fs/cifs Flags and Debug Info           706 Misc /proc/fs/cifs Flags and Debug Info
707 =======================================           707 =======================================
708                                                   708 
709 Informational pseudo-files:                       709 Informational pseudo-files:
710                                                   710 
711 ======================= ======================    711 ======================= =======================================================
712 DebugData               Displays information a    712 DebugData               Displays information about active CIFS sessions and
713                         shares, features enabl    713                         shares, features enabled as well as the cifs.ko
714                         version.                  714                         version.
715 Stats                   Lists summary resource    715 Stats                   Lists summary resource usage information as well as per
716                         share statistics.         716                         share statistics.
717 open_files              List all the open file    717 open_files              List all the open file handles on all active SMB sessions.
718 mount_params            List of all mount para    718 mount_params            List of all mount parameters available for the module
719 ======================= ======================    719 ======================= =======================================================
720                                                   720 
721 Configuration pseudo-files:                       721 Configuration pseudo-files:
722                                                   722 
723 ======================= ======================    723 ======================= =======================================================
724 SecurityFlags           Flags which control se    724 SecurityFlags           Flags which control security negotiation and
725                         also packet signing. A    725                         also packet signing. Authentication (may/must)
726                         flags (e.g. for NTLMv2    726                         flags (e.g. for NTLMv2) may be combined with
727                         the signing flags.  Sp    727                         the signing flags.  Specifying two different password
728                         hashing mechanisms (as    728                         hashing mechanisms (as "must use") on the other hand
729                         does not make much sen    729                         does not make much sense. Default flags are::
730                                                   730 
731                                 0x00C5            731                                 0x00C5
732                                                   732 
733                         (NTLMv2 and packet sig    733                         (NTLMv2 and packet signing allowed).  Some SecurityFlags
734                         may require enabling a    734                         may require enabling a corresponding menuconfig option.
735                                                   735 
736                           may use packet signi    736                           may use packet signing                        0x00001
737                           must use packet sign    737                           must use packet signing                       0x01001
738                           may use NTLMv2          738                           may use NTLMv2                                0x00004
739                           must use NTLMv2         739                           must use NTLMv2                               0x04004
740                           may use Kerberos sec    740                           may use Kerberos security (krb5)              0x00008
741                           must use Kerberos       741                           must use Kerberos                             0x08008
742                           may use NTLMSSP         742                           may use NTLMSSP                               0x00080
743                           must use NTLMSSP        743                           must use NTLMSSP                              0x80080
744                           seal (packet encrypt    744                           seal (packet encryption)                      0x00040
745                           must seal               745                           must seal                                     0x40040
746                                                   746 
747 cifsFYI                 If set to non-zero val    747 cifsFYI                 If set to non-zero value, additional debug information
748                         will be logged to the     748                         will be logged to the system error log.  This field
749                         contains three flags c    749                         contains three flags controlling different classes of
750                         debugging entries.  Th    750                         debugging entries.  The maximum value it can be set
751                         to is 7 which enables     751                         to is 7 which enables all debugging points (default 0).
752                         Some debugging stateme    752                         Some debugging statements are not compiled into the
753                         cifs kernel unless CON    753                         cifs kernel unless CONFIG_CIFS_DEBUG2 is enabled in the
754                         kernel configuration.     754                         kernel configuration. cifsFYI may be set to one or
755                         more of the following     755                         more of the following flags (7 sets them all)::
756                                                   756 
757                           +-------------------    757                           +-----------------------------------------------+------+
758                           | log cifs informati    758                           | log cifs informational messages               | 0x01 |
759                           +-------------------    759                           +-----------------------------------------------+------+
760                           | log return codes f    760                           | log return codes from cifs entry points       | 0x02 |
761                           +-------------------    761                           +-----------------------------------------------+------+
762                           | log slow responses    762                           | log slow responses                            | 0x04 |
763                           | (ie which take lon    763                           | (ie which take longer than 1 second)          |      |
764                           |                       764                           |                                               |      |
765                           | CONFIG_CIFS_STATS2    765                           | CONFIG_CIFS_STATS2 must be enabled in .config |      |
766                           +-------------------    766                           +-----------------------------------------------+------+
767                                                   767 
768 traceSMB                If set to one, debug i    768 traceSMB                If set to one, debug information is logged to the
769                         system error log with     769                         system error log with the start of smb requests
770                         and responses (default    770                         and responses (default 0)
771 LookupCacheEnable       If set to one, inode i    771 LookupCacheEnable       If set to one, inode information is kept cached
772                         for one second improvi    772                         for one second improving performance of lookups
773                         (default 1)               773                         (default 1)
774 LinuxExtensionsEnabled  If set to one then the    774 LinuxExtensionsEnabled  If set to one then the client will attempt to
775                         use the CIFS "UNIX" ex    775                         use the CIFS "UNIX" extensions which are optional
776                         protocol enhancements     776                         protocol enhancements that allow CIFS servers
777                         to return accurate UID    777                         to return accurate UID/GID information as well
778                         as support symbolic li    778                         as support symbolic links. If you use servers
779                         such as Samba that sup    779                         such as Samba that support the CIFS Unix
780                         extensions but do not     780                         extensions but do not want to use symbolic link
781                         support and want to ma    781                         support and want to map the uid and gid fields
782                         to values supplied at     782                         to values supplied at mount (rather than the
783                         actual values, then se    783                         actual values, then set this to zero. (default 1)
784 dfscache                List the content of th    784 dfscache                List the content of the DFS cache.
785                         If set to 0, the clien    785                         If set to 0, the client will clear the cache.
786 ======================= ======================    786 ======================= =======================================================
787                                                   787 
788 These experimental features and tracing can be    788 These experimental features and tracing can be enabled by changing flags in
789 /proc/fs/cifs (after the cifs module has been     789 /proc/fs/cifs (after the cifs module has been installed or built into the
790 kernel, e.g.  insmod cifs).  To enable a featu    790 kernel, e.g.  insmod cifs).  To enable a feature set it to 1 e.g.  to enable
791 tracing to the kernel message log type::          791 tracing to the kernel message log type::
792                                                   792 
793         echo 7 > /proc/fs/cifs/cifsFYI            793         echo 7 > /proc/fs/cifs/cifsFYI
794                                                   794 
795 cifsFYI functions as a bit mask. Setting it to    795 cifsFYI functions as a bit mask. Setting it to 1 enables additional kernel
796 logging of various informational messages.  2     796 logging of various informational messages.  2 enables logging of non-zero
797 SMB return codes while 4 enables logging of re    797 SMB return codes while 4 enables logging of requests that take longer
798 than one second to complete (except for byte r    798 than one second to complete (except for byte range lock requests).
799 Setting it to 4 requires CONFIG_CIFS_STATS2 to    799 Setting it to 4 requires CONFIG_CIFS_STATS2 to be set in kernel configuration
800 (.config). Setting it to seven enables all thr    800 (.config). Setting it to seven enables all three.  Finally, tracing
801 the start of smb requests and responses can be    801 the start of smb requests and responses can be enabled via::
802                                                   802 
803         echo 1 > /proc/fs/cifs/traceSMB           803         echo 1 > /proc/fs/cifs/traceSMB
804                                                   804 
805 Per share (per client mount) statistics are av    805 Per share (per client mount) statistics are available in /proc/fs/cifs/Stats.
806 Additional information is available if CONFIG_    806 Additional information is available if CONFIG_CIFS_STATS2 is enabled in the
807 kernel configuration (.config).  The statistic    807 kernel configuration (.config).  The statistics returned include counters which
808 represent the number of attempted and failed (    808 represent the number of attempted and failed (ie non-zero return code from the
809 server) SMB3 (or cifs) requests grouped by req    809 server) SMB3 (or cifs) requests grouped by request type (read, write, close etc.).
810 Also recorded is the total bytes read and byte    810 Also recorded is the total bytes read and bytes written to the server for
811 that share.  Note that due to client caching e    811 that share.  Note that due to client caching effects this can be less than the
812 number of bytes read and written by the applic    812 number of bytes read and written by the application running on the client.
813 Statistics can be reset to zero by ``echo 0 >     813 Statistics can be reset to zero by ``echo 0 > /proc/fs/cifs/Stats`` which may be
814 useful if comparing performance of two differe    814 useful if comparing performance of two different scenarios.
815                                                   815 
816 Also note that ``cat /proc/fs/cifs/DebugData``    816 Also note that ``cat /proc/fs/cifs/DebugData`` will display information about
817 the active sessions and the shares that are mo    817 the active sessions and the shares that are mounted.
818                                                   818 
819 Enabling Kerberos (extended security) works bu    819 Enabling Kerberos (extended security) works but requires version 1.2 or later
820 of the helper program cifs.upcall to be presen    820 of the helper program cifs.upcall to be present and to be configured in the
821 /etc/request-key.conf file.  The cifs.upcall h    821 /etc/request-key.conf file.  The cifs.upcall helper program is from the Samba
822 project(https://www.samba.org). NTLM and NTLMv    822 project(https://www.samba.org). NTLM and NTLMv2 and LANMAN support do not
823 require this helper. Note that NTLMv2 security    823 require this helper. Note that NTLMv2 security (which does not require the
824 cifs.upcall helper program), instead of using     824 cifs.upcall helper program), instead of using Kerberos, is sufficient for
825 some use cases.                                   825 some use cases.
826                                                   826 
827 DFS support allows transparent redirection to     827 DFS support allows transparent redirection to shares in an MS-DFS name space.
828 In addition, DFS support for target shares whi    828 In addition, DFS support for target shares which are specified as UNC
829 names which begin with host names (rather than    829 names which begin with host names (rather than IP addresses) requires
830 a user space helper (such as cifs.upcall) to b    830 a user space helper (such as cifs.upcall) to be present in order to
831 translate host names to ip address, and the us    831 translate host names to ip address, and the user space helper must also
832 be configured in the file /etc/request-key.con    832 be configured in the file /etc/request-key.conf.  Samba, Windows servers and
833 many NAS appliances support DFS as a way of co    833 many NAS appliances support DFS as a way of constructing a global name
834 space to ease network configuration and improv    834 space to ease network configuration and improve reliability.
835                                                   835 
836 To use cifs Kerberos and DFS support, the Linu    836 To use cifs Kerberos and DFS support, the Linux keyutils package should be
837 installed and something like the following lin    837 installed and something like the following lines should be added to the
838 /etc/request-key.conf file::                      838 /etc/request-key.conf file::
839                                                   839 
840   create cifs.spnego * * /usr/local/sbin/cifs.    840   create cifs.spnego * * /usr/local/sbin/cifs.upcall %k
841   create dns_resolver * * /usr/local/sbin/cifs    841   create dns_resolver * * /usr/local/sbin/cifs.upcall %k
842                                                   842 
843 CIFS kernel module parameters                     843 CIFS kernel module parameters
844 =============================                     844 =============================
845 These module parameters can be specified or mo    845 These module parameters can be specified or modified either during the time of
846 module loading or during the runtime by using     846 module loading or during the runtime by using the interface::
847                                                   847 
848         /sys/module/cifs/parameters/<param>       848         /sys/module/cifs/parameters/<param>
849                                                   849 
850 i.e.::                                            850 i.e.::
851                                                   851 
852     echo "value" > /sys/module/cifs/parameters    852     echo "value" > /sys/module/cifs/parameters/<param>
853                                                   853 
854 More detailed descriptions of the available mo    854 More detailed descriptions of the available module parameters and their values
855 can be seen by doing:                             855 can be seen by doing:
856                                                   856 
857     modinfo cifs (or modinfo smb3)                857     modinfo cifs (or modinfo smb3)
858                                                   858 
859 ================= ============================    859 ================= ==========================================================
860 1. enable_oplocks Enable or disable oplocks. O    860 1. enable_oplocks Enable or disable oplocks. Oplocks are enabled by default.
861                   [Y/y/1]. To disable use any     861                   [Y/y/1]. To disable use any of [N/n/0].
862 ================= ============================    862 ================= ==========================================================
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php