s3: Fix bug #9085.
[Samba.git] / docs-xml / manpages-3 / mount.cifs.8.xml
blobd58859bea45f3b069d16a10079b84a3d1947255b
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="mount.cifs.8">
5 <refmeta>
6         <refentrytitle>mount.cifs</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">3.5</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>mount.cifs</refname>
16         <refpurpose>mount using the Common Internet File System (CIFS)</refpurpose>
17 </refnamediv>
19 <refsynopsisdiv>
20         <cmdsynopsis>
22                 <command>mount.cifs</command>
23                 <arg choice="req">service</arg> 
24                 <arg choice="req">mount-point</arg>     
25                 <arg choice="opt">-o options</arg>      
26         </cmdsynopsis>
27 </refsynopsisdiv>
29 <refsect1>
30         <title>DESCRIPTION</title>
32         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
33         <manvolnum>7</manvolnum></citerefentry> suite.</para>
35         <para>mount.cifs mounts a Linux CIFS filesystem. It
36 is usually invoked indirectly by
37 the <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> command when using the 
38 "-t cifs" option. This command only works in Linux, and the kernel must
39 support the cifs filesystem. The CIFS protocol is the successor to the 
40 SMB protocol and is supported by most Windows servers and many other
41 commercial servers and Network Attached Storage appliances as well as 
42 by the popular Open Source server Samba.
43         </para>
45         <para>
46         The mount.cifs utility attaches the UNC name (exported network resource)
47         specified as <emphasis>service</emphasis> (using //server/share syntax,
48         where "server" is the server name or IP address and "share" is the name
49         of the share) to the local directory <emphasis>mount-point</emphasis>.
50         </para>
52         <para>
53                 Options to <emphasis>mount.cifs</emphasis> are specified as a comma-separated
54 list of key=value pairs. It is possible to send options other
55 than those listed here, assuming that the cifs filesystem kernel module (cifs.ko) supports them.   
56 Unrecognized cifs mount options passed to the cifs vfs kernel code will be logged to the
57 kernel log.
59         </para>
61         <para><emphasis>mount.cifs</emphasis> causes the cifs vfs to launch a thread named cifsd. After mounting it keeps running until
62                 the mounted resource is unmounted (usually via the umount utility).
63         </para>
65         <para>
66                 <emphasis>mount.cifs -V</emphasis> command displays the version of cifs mount helper.
67         </para>
68         <para>
70                 <emphasis>modinfo cifs</emphasis> command displays the version of cifs module.
71         </para>
73 </refsect1>
75 <refsect1>
76         <title>OPTIONS</title>
77         <variablelist>
78                 <varlistentry><term>user=<replaceable>arg</replaceable></term>
80                 <listitem><para>specifies the username to connect as. If
81                                 this is not given, then the environment variable <emphasis>USER</emphasis> is used. This option can also take the
82 form "user%password" or "workgroup/user" or
83 "workgroup/user%password" to allow the password and workgroup
84 to be specified as part of the username.
85                 </para>
87 <note>
88         <para>
89         The cifs vfs accepts the parameter <parameter>user=</parameter>, or for users familiar with smbfs it accepts the longer form of the parameter <parameter>username=</parameter>.  Similarly the longer smbfs style parameter names may be accepted as synonyms for the shorter cifs parameters <parameter>pass=</parameter>,<parameter>dom=</parameter> and <parameter>cred=</parameter>.
90         </para>
91 </note>
93                 </listitem>
94         </varlistentry>
96         <varlistentry><term>password=<replaceable>arg</replaceable></term>
98                 <listitem><para>specifies the CIFS password. If this
99 option is not given then the environment variable
100 <emphasis>PASSWD</emphasis> is used. If the password is not specified
101 directly or indirectly via an argument to mount, <emphasis>mount.cifs</emphasis> will prompt
102 for a password, unless the guest option is specified.
103 </para>
105 <para>Note that a password which contains the delimiter
106 character (i.e. a comma ',') will fail to be parsed correctly
107 on the command line.  However, the same password defined
108 in the PASSWD environment variable or via a credentials file (see
109 below) or entered at the password prompt will be read correctly.
110 </para>
111         </listitem></varlistentry>
113         <varlistentry><term>credentials=<replaceable>filename</replaceable></term>
115                 <listitem><para>
116                                 specifies a file that contains a username
117                                 and/or password and optionally the name of the
118                                 workgroup. The format of the file is:
119                         </para>
121 <programlisting>
122                 username=<replaceable>value</replaceable>
123                 password=<replaceable>value</replaceable>
124                 domain=<replaceable>value</replaceable>
125 </programlisting>
127                 <para>
128 This is preferred over having passwords in plaintext in a
129 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
130 credentials file properly.
131                 </para>
132         </listitem></varlistentry>
134         <varlistentry>
135                 <term>uid=<replaceable>arg</replaceable></term>
136                 <listitem>
138         <para>sets the uid that will own all files or directories on the
139 mounted filesystem when the server does not provide ownership
140 information. It may be specified as either a username or a numeric uid.
141 When not specified, the default is uid 0.  The mount.cifs helper must be
142 at version 1.10 or higher to support specifying the uid in non-numeric
143 form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more
144 information.  </para>
146 </listitem>
147 </varlistentry>
149 <varlistentry>
150         <term>prefixpath=<replaceable>arg</replaceable></term>
151         <listitem>
152                 <para>
153                         It's possible to mount a subdirectory of a share. The preferred way
154                         to do this is to append the path to the UNC when mounting. However,
155                         it's also possible to do the same by setting this option and
156                         providing the path there.
157                 </para>
158         </listitem>
159 </varlistentry>
161 <varlistentry>
162         <term>cifsacl</term>
163         <listitem>
164                 <para>
165            This option is used to map CIFS/NTFS ACLs to/from Linux permission
166            bits, map SIDs to/from UIDs and GIDs, and get and set Security
167            Descriptors.
168                 </para>
169         </listitem>
170 </varlistentry>
172 <varlistentry>
173         <term>forceuid</term>
174         <listitem>
175                 <para>instructs the client to ignore any uid provided by
176 the server for files and directories and to always assign the owner to
177 be the value of the uid= option. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.</para>
178         </listitem>
179 </varlistentry>
181 <varlistentry>
182         <term>gid=<replaceable>arg</replaceable></term>
183         <listitem>
185                 <para>sets the gid that will own all files or
186 directories on the mounted filesystem when the server does not provide
187 ownership information.  It may be specified as either a groupname or a
188 numeric gid.  When not specified, the default is gid 0. The mount.cifs
189 helper must be at version 1.10 or higher to support specifying the gid
190 in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND
191 PERMISSIONS below for more information.</para>
193         </listitem>
194 </varlistentry>
196 <varlistentry>
197         <term>forcegid</term>
198         <listitem>
199                 <para>instructs the client to ignore any gid provided by
200 the server for files and directories and to always assign the owner to
201 be the value of the gid= option. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.</para>
202         </listitem>
203 </varlistentry>
205 <varlistentry>
206                 <term>port=<replaceable>arg</replaceable></term>
208                 <listitem><para>sets the port number on the server to attempt to contact to negotiate
209 CIFS support.  If the CIFS server is not listening on this port or
210 if it is not specified, the default ports will be tried i.e. 
211 port 445 is tried and if no response then port 139 is tried.
212                 </para></listitem>
213         </varlistentry>
215         <varlistentry>
216                 <term>servernetbiosname=<replaceable>arg</replaceable></term>
218                 <listitem><para>
219                 Specify the server netbios name (RFC1001 name) to use
220                 when attempting to setup a session to the server. Although
221                 rarely needed for mounting to newer servers, this option
222                 is needed for mounting to some older servers (such
223                 as OS/2 or Windows 98 and Windows ME) since when connecting
224                 over port 139 they, unlike most newer servers, do not
225                 support a default server name.  A server name can be up
226                 to 15 characters long and is usually uppercased.
227                 </para></listitem>
228         </varlistentry>
230 <varlistentry>
231         <term>servern=<replaceable>arg</replaceable></term>
232         <listitem>
233                 <para>synonym for <emphasis>servernetbiosname=</emphasis></para>
234         </listitem>
235 </varlistentry>
237         <varlistentry>
238                 <term>netbiosname=<replaceable>arg</replaceable></term>
240                 <listitem><para>When mounting to servers via port 139, specifies the RFC1001
241                 source name to use to represent the client netbios machine
242                 name when doing the RFC1001 netbios session initialize.
243                 </para></listitem>
244         </varlistentry>
246         <varlistentry>
247                 <term>file_mode=<replaceable>arg</replaceable></term>
249                 <listitem><para>If the server does not support the CIFS Unix extensions this
250                                 overrides the default file mode.</para></listitem>
251         </varlistentry>
253         <varlistentry>
254                 <term>dir_mode=<replaceable>arg</replaceable></term>
256                 <listitem><para>If the server does not support the CIFS Unix extensions this
257                                 overrides the default mode for directories. </para></listitem>
258         </varlistentry>
260         <varlistentry>
261                 <term>ip=<replaceable>arg</replaceable></term>
263                 <listitem><para>sets the destination IP address.  This option is set automatically if the server name portion of the requested UNC name can be resolved so rarely needs to be specified by the user.</para></listitem>
264         </varlistentry>
266         <varlistentry>
267                 <term>domain=<replaceable>arg</replaceable></term>
269                 <listitem><para>sets the domain (workgroup) of the user </para></listitem>
270         </varlistentry>
272         <varlistentry>
273                 <term>guest</term>
275                 <listitem><para>don't prompt for a password </para></listitem>
277         </varlistentry>
279         <varlistentry>
280                 <term>iocharset</term>
282                 <listitem><para>Charset used to convert local path names to and from
283                 Unicode. Unicode is used by default for network path
284                 names if the server supports it. If iocharset is
285                 not specified then the nls_default specified
286                 during the local client kernel build will be used.
287                 If server does not support Unicode, this parameter is
288                 unused. </para></listitem>
290         </varlistentry>
292         <varlistentry>
293                 <term>ro</term>
295                 <listitem><para>mount read-only</para></listitem>
297         </varlistentry>
299         <varlistentry>
300                 <term>rw</term>
301                 <listitem><para>mount read-write</para></listitem>
302         </varlistentry>
304         <varlistentry>
305                 <term>setuids</term>
306                 <listitem><para>If the CIFS Unix extensions are negotiated with the server
307                 the client will attempt to set the effective uid and gid of
308                 the local process on newly created files, directories, and
309                 devices (create, mkdir, mknod). If the CIFS Unix Extensions
310                 are not negotiated, for newly created files and directories
311                 instead of using the default uid and gid specified on the
312                 the mount, cache the new file's uid and gid locally which means
313                 that the uid for the file can change when the inode is
314                 reloaded (or the user remounts the share).</para></listitem>
315         </varlistentry>
317         <varlistentry>
318                 <term>nosetuids</term>
319                 <listitem><para>The client will not attempt to set the uid and gid on
320                 on newly created files, directories, and devices (create,
321                 mkdir, mknod) which will result in the server setting the
322                 uid and gid to the default (usually the server uid of the
323                 user who mounted the share).  Letting the server (rather than
324                 the client) set the uid and gid is the default.If the CIFS
325                 Unix Extensions are not negotiated then the uid and gid for
326                 new files will appear to be the uid (gid) of the mounter or the
327                 uid (gid) parameter specified on the mount.</para></listitem>
328         </varlistentry>
330         <varlistentry>
331                 <term>perm</term>
332                 <listitem><para>Client does permission checks (vfs_permission check of uid
333                 and gid of the file against the mode and desired operation),
334                 Note that this is in addition to the normal ACL check on the
335                 target machine done by the server software.
336                 Client permission checking is enabled by default.</para></listitem>
337         </varlistentry>
339         <varlistentry>
340                 <term>noperm</term>
341                 <listitem><para>Client does not do permission checks.  This can expose
342                 files on this mount to access by other users on the local
343                 client system. It is typically only needed when the server
344                 supports the CIFS Unix Extensions but the UIDs/GIDs on the
345                 client and server system do not match closely enough to allow
346                 access by the user doing the mount.
347                 Note that this does not affect the normal ACL check on the
348                 target machine done by the server software (of the server
349                 ACL against the user name provided at mount time).</para></listitem>
350         </varlistentry>
352         <varlistentry>
353                 <term>dynperm</term>
354                 <listitem><para>Instructs the server to maintain ownership and
355 permissions in memory that can't be stored on the server. This information can disappear at any time (whenever the inode is flushed from the cache), so while this may help make some applications work, it's behavior is somewhat unreliable. See the section below on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS for more information.
356                 </para></listitem>
357         </varlistentry>
359         <varlistentry>
360                 <term>directio</term>
361                 <listitem><para>Do not do inode data caching on files opened on this mount.
362                 This precludes mmaping files on this mount. In some cases
363                 with fast networks and little or no caching benefits on the
364                 client (e.g. when the application is doing large sequential
365                 reads bigger than page size without rereading the same data)
366                 this can provide better performance than the default
367                 behavior which caches reads (readahead) and writes
368                 (writebehind) through the local Linux client pagecache
369                 if oplock (caching token) is granted and held. Note that
370                 direct allows write operations larger than page size
371                 to be sent to the server. On some kernels this requires the cifs.ko module
372                 to be built with the CIFS_EXPERIMENTAL configure option.</para></listitem>
373         </varlistentry>
375         <varlistentry>
376                 <term>mapchars</term>
377                 <listitem><para>Translate six of the seven reserved characters (not backslash, but including the colon, question mark, pipe, asterik, greater than and less than characters)
378                 to the remap range (above 0xF000), which also
379                 allows the CIFS client to recognize files created with
380                 such characters by Windows's POSIX emulation. This can
381                 also be useful when mounting to most versions of Samba
382                 (which also forbids creating and opening files
383                 whose names contain any of these seven characters).
384                 This has no effect if the server does not support
385                 Unicode on the wire. Please note that the files created
386                 with mapchars mount option may not be accessible
387                 if the share is mounted without that option.</para></listitem>
388         </varlistentry>
390         <varlistentry>
391                 <term>nomapchars</term>
392                 <listitem><para>Do not translate any of these seven characters (default)</para></listitem>
393         </varlistentry>
395         <varlistentry>
396                 <term>intr</term>
397                 <listitem><para>currently unimplemented</para></listitem>
398         </varlistentry>
400         <varlistentry>
401                 <term>nointr</term>
402                 <listitem><para>(default) currently unimplemented </para></listitem>
403         </varlistentry>
405         <varlistentry>
406                 <term>hard</term>
407                 <listitem><para>The  program  accessing  a file on the cifs mounted file system will hang when the
408               server crashes.</para></listitem>
409         </varlistentry>
411         <varlistentry>
412                 <term>soft</term>
413                 <listitem><para>(default) The  program  accessing  a file on the cifs mounted file system will not hang when the server crashes and will return errors to the user application.</para></listitem>
414         </varlistentry>
416         <varlistentry>
417                 <term>noacl</term>
418                 <listitem><para>Do not allow POSIX ACL operations even if server would support them.</para><para>
419                 The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
420                 version 3.0.10 and later.  Setting POSIX ACLs requires enabling both XATTR and
421                 then POSIX support in the CIFS configuration options when building the cifs
422                 module.  POSIX ACL support can be disabled on a per mount basis by specifying
423                 "noacl" on mount.</para>
424                 </listitem>
425         </varlistentry>
427         <varlistentry>
428                 <term>nocase</term>
429                 <listitem>
430                 <para>Request case insensitive path name matching (case
431                 sensitive is the default if the server suports it).
432                 </para>
433                 </listitem>
434         </varlistentry>
436 <varlistentry>
437         <term>ignorecase</term>
438         <listitem>
439                 <para>
440                 Synonym for <emphasis>nocase</emphasis>
441                 </para>
442         </listitem>
443 </varlistentry>
445         <varlistentry>
446                 <term>sec=</term>
447                 <listitem>
448                 <para>Security mode.  Allowed values are:</para>
449                         <itemizedlist>
450                         <listitem><para>none    attempt to connection as a null user (no name) </para></listitem>
451                         <listitem><para>krb5    Use Kerberos version 5 authentication</para></listitem>
452                         <listitem><para>krb5i   Use Kerberos authentication and packet signing</para></listitem>
453                         <listitem><para>ntlm    Use NTLM password hashing (default)</para></listitem>
454                         <listitem><para>ntlmi   Use NTLM password hashing with signing (if
455                                 /proc/fs/cifs/PacketSigningEnabled on or if
456                                 server requires signing also can be the default)</para></listitem>
457                         <listitem><para>ntlmv2  Use NTLMv2 password hashing</para></listitem>
458                         <listitem><para>ntlmv2i Use NTLMv2 password hashing with packet signing</para></listitem>
459                         </itemizedlist>
461                         <para>[NB This [sec parameter] is under development and expected to be available in cifs kernel module 1.40 and later]
462                 </para>
463                 </listitem>
464         </varlistentry>
466         <varlistentry>
467                 <term>nobrl</term>
468                 <listitem>
469                 <para>Do not send byte range lock requests to the server.
470                 This is necessary for certain applications that break
471                 with cifs style mandatory byte range locks (and most
472                 cifs servers do not yet support requesting advisory
473                 byte range locks).
474                 </para>
475                 </listitem>
476         </varlistentry>
478         <varlistentry>
479                 <term>sfu</term>
480                 <listitem>
481                 <para>
482                 When the CIFS Unix Extensions are not negotiated, attempt to
483                 create device files and fifos in a format compatible with
484                 Services for Unix (SFU).  In addition retrieve bits 10-12
485                 of the mode via the SETFILEBITS extended attribute (as
486                 SFU does).  In the future the bottom 9 bits of the mode
487                 mode also will be emulated using queries of the security
488                 descriptor (ACL). [NB: requires version 1.39 or later
489                 of the CIFS VFS.  To recognize symlinks and be able
490                 to create symlinks in an SFU interoperable form
491                 requires version 1.40 or later of the CIFS VFS kernel module.
492                 </para>
493                 </listitem>
494         </varlistentry>
496         <varlistentry>
497                 <term>serverino</term>
498                 <listitem><para>Use inode numbers (unique persistent file identifiers)
499                 returned by the server instead of automatically generating
500                 temporary inode numbers on the client.  Although server inode numbers
501                 make it easier to spot hardlinked files (as they will have
502                 the same inode numbers) and inode numbers may be persistent (which is
503                 userful for some sofware),
504                 the server does not guarantee that the inode numbers
505                 are unique if multiple server side mounts are exported under a
506                 single share (since inode numbers on the servers might not
507                 be unique if multiple filesystems are mounted under the same
508                 shared higher level directory).  Note that not all 
509                 servers support returning server inode numbers, although
510                 those that support the CIFS Unix Extensions, and Windows 2000 and
511                 later servers typically do support this (although not necessarily
512                 on every local server filesystem). Parameter has no effect if
513                 the server lacks support for returning inode numbers or equivalent.
514                 </para></listitem>
515         </varlistentry>
517         <varlistentry>
518                 <term>noserverino</term>
519                 <listitem>
520                 <para>
521                         Client generates inode numbers (rather than
522                 using the actual one from the server) by default.
523                 </para>
524                 <para>
525                         See section <emphasis>INODE NUMBERS</emphasis> for
526                 more information.
527                 </para></listitem>
528         </varlistentry>
530         <varlistentry>
531                 <term>nounix</term>
532                 <listitem>
533                 <para>
534                         Disable the CIFS Unix Extensions for this mount. This
535                 can be useful in order to turn off multiple settings at once.
536                 This includes POSIX acls, POSIX locks, POSIX paths, symlink
537                 support and retrieving uids/gids/mode from the server. This
538                 can also be useful to work around a bug in a server that
539                 supports Unix Extensions.
540                 </para>
541                 <para>
542                 See section <emphasis>INODE NUMBERS</emphasis> for
543                 more information.
544                 </para> </listitem>
545         </varlistentry>
547         <varlistentry>
548                 <term>nouser_xattr</term>
549                 <listitem><para>(default) Do not allow getfattr/setfattr to get/set xattrs, even if server would support it otherwise. </para></listitem>
550         </varlistentry>
552         <varlistentry>
553                 <term>rsize=<replaceable>arg</replaceable></term>
554                 <listitem><para>default network read size (usually 16K). The client currently
555                 can not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize
556                 defaults to 16K and may be changed (from 8K to the maximum
557                 kmalloc size allowed by your kernel) at module install time
558                 for cifs.ko. Setting CIFSMaxBufSize to a very large value
559                 will cause cifs to use more memory and may reduce performance
560                 in some cases.  To use rsize greater than 127K (the original
561                 cifs protocol maximum) also requires that the server support
562                 a new Unix Capability flag (for very large read) which some
563                 newer servers (e.g. Samba 3.0.26 or later) do. rsize can be
564                 set from a minimum of 2048 to a maximum of 130048 (127K or
565                 CIFSMaxBufSize, whichever is smaller)
567                 </para></listitem>
568         </varlistentry>
570         <varlistentry>
571                 <term>wsize=<replaceable>arg</replaceable></term>
573                 <listitem><para>default network write size (default 57344)
574                 maximum wsize currently allowed by CIFS is 57344 (fourteen
575                 4096 byte pages)</para></listitem>
576         </varlistentry>
578 <varlistentry>
579         <term>noposixpaths</term>
580         <listitem>
581                 <para>
582            If unix extensions are enabled on a share, then the client will
583            typically allow filenames to include any character besides '/' in a
584            pathname component, and will use forward slashes as a pathname
585            delimiter. This option prevents the client from attempting to
586            negotiate the use of posix-style pathnames to the server.
587                 </para>
588         </listitem>
589 </varlistentry>
591 <varlistentry>
592         <term>posixpaths</term>
593         <listitem>
594                 <para>
595                 Inverse of <emphasis>noposixpaths</emphasis>
596                 </para>
597         </listitem>
598 </varlistentry>
600          <varlistentry>
601                 <term>--verbose</term>
602                 <listitem><para>Print additional debugging information for the mount. Note that this parameter must be specified before the -o. For example:</para><para>mount -t cifs //server/share /mnt --verbose -o user=username</para></listitem>
603         </varlistentry>
606         </variablelist>
607 </refsect1>
609 <refsect1>
610         <title>SERVICE FORMATTING AND DELIMITERS</title>
612         <para>
613                 It's generally preferred to use forward slashes (/) as a delimiter in service names. They are considered to be the "universal delimiter" since they are generally not allowed to be embedded within path components on Windows machines and the client can convert them to blackslashes (\) unconditionally. Conversely, backslash characters are allowed by POSIX to be part of a path component, and can't be automatically converted in the same way.
614         </para>
615         <para>
616                 mount.cifs will attempt to convert backslashes to forward slashes where it's able to do so, but it cannot do so in any path component following the sharename.
617         </para>
618 </refsect1>
620 <refsect1>
621         <title>INODE NUMBERS</title>
622         <para>
623                 When Unix Extensions are enabled, we use the actual inode
624         number provided by the server in response to the POSIX calls as an
625         inode number.
626         </para>
627         <para>
628                 When Unix Extensions are disabled and "serverino" mount option
629         is enabled there is no way to get the server inode number. The
630         client typically maps the server-assigned "UniqueID" onto an inode
631         number.
632         </para>
633         <para>
634                 Note that the UniqueID is a different value from the server
635         inode number. The UniqueID value is unique over the scope of the entire
636         server and is often greater than 2 power 32. This value often makes
637         programs that are not compiled with LFS (Large File Support), to
638         trigger a glibc EOVERFLOW error as this won't fit in the target
639         structure field. It is strongly recommended to compile your programs
640         with LFS support (i.e. with -D_FILE_OFFSET_BITS=64) to prevent this
641         problem. You can also use "noserverino" mount option to generate inode
642         numbers smaller than 2 power 32 on the client. But you may not be able
643         to detect hardlinks properly.
644         </para>
645 </refsect1>
647 <refsect1>
648         <title>FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS</title>
650         <para> The core CIFS protocol does not provide unix ownership
651 information or mode for files and directories. Because of this, files
652 and directories will generally appear to be owned by whatever values the
653 uid= or gid= options are set, and will have permissions set to the
654 default file_mode and dir_mode for the mount. Attempting to change these
655 values via chmod/chown will return success but have no effect.</para>
657         <para>When the client and server negotiate unix extensions,
658 files and directories will be assigned the uid, gid, and mode provided
659 by the server. Because CIFS mounts are generally single-user, and the
660 same credentials are used no matter what user accesses the mount, newly
661 created files and directories will generally be given ownership
662 corresponding to whatever credentials were used to mount the
663 share.</para>
665         <para>If the uid's and gid's being used do not match on the
666 client and server, the forceuid and forcegid options may be helpful.
667 Note however, that there is no corresponding option to override the
668 mode. Permissions assigned to a file when forceuid or forcegid are in
669 effect may not reflect the the real permissions.</para>
671         <para>When unix extensions are not negotiated, it's also
672 possible to emulate them locally on the server using the "dynperm" mount
673 option. When this mount option is in effect, newly created files and
674 directories will receive what appear to be proper permissions. These
675 permissions are not stored on the server however and can disappear at
676 any time in the future (subject to the whims of the kernel flushing out
677 the inode cache). In general, this mount option is discouraged.
678         </para>
680         <para>It's also possible to override permission checking on the client
681 altogether via the noperm option. Server-side permission checks cannot be
682 overriden. The permission checks done by the server will always correspond to
683 the credentials used to mount the share, and not necessarily to the user who is accessing the share.</para>
685 </refsect1>
687 <refsect1>
688         <title>ENVIRONMENT VARIABLES</title>
690         <para>
691                 The variable <emphasis>USER</emphasis> may contain the username of the
692 person to be used to authenticate to the server.
693 The variable can be used to set both username and
694 password by using the format username%password.
695         </para>
696         
697         <para>
698                 The variable <emphasis>PASSWD</emphasis> may contain the password of the
699 person using the client.
700         </para>
702         <para>
703                 The variable <emphasis>PASSWD_FILE</emphasis> may contain the pathname
704 of a file to read the password from. A single line of input is
705 read and used as the password.
706         </para>
708 </refsect1>
710 <refsect1>
711         <title>NOTES</title>
712         
713         <para>This command may be used only by root, unless installed setuid, in which case the noeexec and nosuid mount flags are enabled. When installed as a setuid program, the program follows the conventions set forth by the mount program for user mounts.</para>
715         <para>
716         Some samba client tools like smbclient(8) honour client-side
717         configuration parameters present in smb.conf. Unlike those
718         client tools, <emphasis>mount.cifs</emphasis> ignores smb.conf
719         completely.
720         </para>
722 </refsect1>
724 <refsect1>
725         <title>CONFIGURATION</title>
726                 <para>
727 The primary mechanism for making configuration changes and for reading 
728 debug information for the cifs vfs is via the Linux /proc filesystem.
729 In the directory <filename>/proc/fs/cifs</filename> are various 
730 configuration files and pseudo files which can display debug information.  
731 There are additional startup options such as maximum buffer size and number
732 of buffers which only may be set when the kernel cifs vfs (cifs.ko module) is 
733 loaded.  These can be seen by running the modinfo utility against the file
734 cifs.ko which will list the options that may be passed to cifs during module
735 installation (device driver load).
736 For more information see the kernel file <filename>fs/cifs/README</filename>.
737 </para>
738 </refsect1>
740 <refsect1>
741         <title>BUGS</title>
743         <para>Mounting using the CIFS URL specification is currently not supported.
744         </para>
746         <para>The credentials file does not handle usernames or passwords with
747                 leading space.</para>
749         <para>
750 Note that the typical response to a bug report is a suggestion
751 to try the latest version first. So please try doing that first,
752 and always include which versions you use of relevant software
753 when reporting bugs (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version) and
754 server type you are trying to contact.
755 </para>
756 </refsect1>
760 <refsect1>
761         <title>VERSION</title>
763         <para>This man page is correct for version 1.52 of 
764         the cifs vfs filesystem (roughly Linux kernel 2.6.24).</para>
765 </refsect1>
767 <refsect1>
768         <title>SEE ALSO</title>
769         <para>
770         Documentation/filesystems/cifs.txt and fs/cifs/README in the linux kernel
771         source tree may contain additional options and information.
772 </para>
773         <para><citerefentry><refentrytitle>umount.cifs</refentrytitle>
774         <manvolnum>8</manvolnum></citerefentry></para>
776 </refsect1>
778 <refsect1>
779         <title>AUTHOR</title>
780         
781         <para>Steve French</para>
783         <para>The syntax and manpage were loosely based on that of smbmount. It 
784                 was converted to Docbook/XML by Jelmer Vernooij.</para>
786         <para>The maintainer of the Linux cifs vfs and the userspace
787                 tool <emphasis>mount.cifs</emphasis> is <ulink url="mailto:sfrench@samba.org">Steve French</ulink>.
788                 The <ulink url="mailto:linux-cifs-client@lists.samba.org">Linux CIFS Mailing list</ulink> 
789                 is the preferred place to ask questions regarding these programs. 
790         </para>
792 </refsect1>
794 </refentry>