1MOUNT.CIFS(8)             System Administration tools            MOUNT.CIFS(8)
2
3
4

NAME

6       mount.cifs - mount using the Common Internet File System (CIFS)
7

SYNOPSIS

9       mount.cifs {service} {mount-point} [-o options]
10

DESCRIPTION

12       This tool is part of the cifs-utils suite.
13
14       mount.cifs mounts a Linux CIFS filesystem. It is usually invoked
15       indirectly by the mount(8) command when using the "-t cifs" option.
16       This command only works in Linux, and the kernel must support the cifs
17       filesystem. The CIFS protocol is the successor to the SMB protocol and
18       is supported by most Windows servers and many other commercial servers
19       and Network Attached Storage appliances as well as by the popular Open
20       Source server Samba.
21
22       The mount.cifs utility attaches the UNC name (exported network
23       resource) specified as service (using //server/share syntax, where
24       "server" is the server name or IP address and "share" is the name of
25       the share) to the local directory mount-point.
26
27       Options to mount.cifs are specified as a comma-separated list of
28       key=value pairs. It is possible to send options other than those listed
29       here, assuming that the cifs filesystem kernel module (cifs.ko)
30       supports them. Unrecognized cifs mount options passed to the cifs vfs
31       kernel code will be logged to the kernel log.
32
33       mount.cifs causes the cifs vfs to launch a thread named cifsd. After
34       mounting it keeps running until the mounted resource is unmounted
35       (usually via the umount utility).
36
37       mount.cifs -V command displays the version of cifs mount helper.
38
39       modinfo cifs command displays the version of cifs module.
40

OPTIONS

42       user=arg
43           specifies the username to connect as. If this is not given, then
44           the environment variable USER is used. This option can also take
45           the form "user%password" or "workgroup/user" or
46           "workgroup/user%password" to allow the password and workgroup to be
47           specified as part of the username.
48
49               Note
50               The cifs vfs accepts the parameter user=, or for users familiar
51               with smbfs it accepts the longer form of the parameter
52               username=. Similarly the longer smbfs style parameter names may
53               be accepted as synonyms for the shorter cifs parameters
54               pass=,dom= and cred=.
55
56       password=arg
57           specifies the CIFS password. If this option is not given then the
58           environment variable PASSWD is used. If the password is not
59           specified directly or indirectly via an argument to mount,
60           mount.cifs will prompt for a password, unless the guest option is
61           specified.
62
63           Note that a password which contains the delimiter character (i.e. a
64           comma ´,´) will fail to be parsed correctly on the command line.
65           However, the same password defined in the PASSWD environment
66           variable or via a credentials file (see below) or entered at the
67           password prompt will be read correctly.
68
69       credentials=filename
70           specifies a file that contains a username and/or password and
71           optionally the name of the workgroup. The format of the file is:
72
73                         username=value
74                         password=value
75                         domain=value
76
77           This is preferred over having passwords in plaintext in a shared
78           file, such as /etc/fstab. Be sure to protect any credentials file
79           properly.
80
81       uid=arg
82           sets the uid that will own all files or directories on the mounted
83           filesystem when the server does not provide ownership information.
84           It may be specified as either a username or a numeric uid. When not
85           specified, the default is uid 0. The mount.cifs helper must be at
86           version 1.10 or higher to support specifying the uid in non-numeric
87           form. See the section on FILE AND DIRECTORY OWNERSHIP AND
88           PERMISSIONS below for more information.
89
90       forceuid
91           instructs the client to ignore any uid provided by the server for
92           files and directories and to always assign the owner to be the
93           value of the uid= option. See the section on FILE AND DIRECTORY
94           OWNERSHIP AND PERMISSIONS below for more information.
95
96       cruid=arg
97           sets the uid of the owner of the credentials cache. This is
98           primarily useful with sec=krb5. The default is the real uid of the
99           process performing the mount. Setting this parameter directs the
100           upcall to look for a credentials cache owned by that user.
101
102       gid=arg
103           sets the gid that will own all files or directories on the mounted
104           filesystem when the server does not provide ownership information.
105           It may be specified as either a groupname or a numeric gid. When
106           not specified, the default is gid 0. The mount.cifs helper must be
107           at version 1.10 or higher to support specifying the gid in
108           non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP
109           AND PERMISSIONS below for more information.
110
111       forcegid
112           instructs the client to ignore any gid provided by the server for
113           files and directories and to always assign the owner to be the
114           value of the gid= option. See the section on FILE AND DIRECTORY
115           OWNERSHIP AND PERMISSIONS below for more information.
116
117       port=arg
118           sets the port number on which the client will attempt to contact
119           the CIFS server. If this value is specified, look for an existing
120           connection with this port, and use that if one exists. If one
121           doesn't exist, try to create a new connection on that port. If that
122           connection fails, return an error. If this value isn't specified,
123           look for an existing connection on port 445 or 139. If no such
124           connection exists, try to connect on port 445 first and then port
125           139 if that fails. Return an error if both fail.
126
127       servern=arg
128           Specify the server netbios name (RFC1001 name) to use when
129           attempting to setup a session to the server. Although rarely needed
130           for mounting to newer servers, this option is needed for mounting
131           to some older servers (such as OS/2 or Windows 98 and Windows ME)
132           since when connecting over port 139 they, unlike most newer
133           servers, do not support a default server name. A server name can be
134           up to 15 characters long and is usually uppercased.
135
136       netbiosname=arg
137           When mounting to servers via port 139, specifies the RFC1001 source
138           name to use to represent the client netbios machine name when doing
139           the RFC1001 netbios session initialize.
140
141       file_mode=arg
142           If the server does not support the CIFS Unix extensions this
143           overrides the default file mode.
144
145       dir_mode=arg
146           If the server does not support the CIFS Unix extensions this
147           overrides the default mode for directories.
148
149       ip=arg
150           sets the destination IP address. This option is set automatically
151           if the server name portion of the requested UNC name can be
152           resolved so rarely needs to be specified by the user.
153
154       domain=arg
155           sets the domain (workgroup) of the user
156
157       guest
158           don´t prompt for a password
159
160       iocharset
161           Charset used to convert local path names to and from Unicode.
162           Unicode is used by default for network path names if the server
163           supports it. If iocharset is not specified then the nls_default
164           specified during the local client kernel build will be used. If
165           server does not support Unicode, this parameter is unused.
166
167       ro
168           mount read-only
169
170       rw
171           mount read-write
172
173       setuids
174           If the CIFS Unix extensions are negotiated with the server the
175           client will attempt to set the effective uid and gid of the local
176           process on newly created files, directories, and devices (create,
177           mkdir, mknod). If the CIFS Unix Extensions are not negotiated, for
178           newly created files and directories instead of using the default
179           uid and gid specified on the the mount, cache the new file´s uid
180           and gid locally which means that the uid for the file can change
181           when the inode is reloaded (or the user remounts the share).
182
183       nosetuids
184           The client will not attempt to set the uid and gid on on newly
185           created files, directories, and devices (create, mkdir, mknod)
186           which will result in the server setting the uid and gid to the
187           default (usually the server uid of the user who mounted the share).
188           Letting the server (rather than the client) set the uid and gid is
189           the default.If the CIFS Unix Extensions are not negotiated then the
190           uid and gid for new files will appear to be the uid (gid) of the
191           mounter or the uid (gid) parameter specified on the mount.
192
193       perm
194           Client does permission checks (vfs_permission check of uid and gid
195           of the file against the mode and desired operation), Note that this
196           is in addition to the normal ACL check on the target machine done
197           by the server software. Client permission checking is enabled by
198           default.
199
200       noperm
201           Client does not do permission checks. This can expose files on this
202           mount to access by other users on the local client system. It is
203           typically only needed when the server supports the CIFS Unix
204           Extensions but the UIDs/GIDs on the client and server system do not
205           match closely enough to allow access by the user doing the mount.
206           Note that this does not affect the normal ACL check on the target
207           machine done by the server software (of the server ACL against the
208           user name provided at mount time).
209
210       dynperm
211           Instructs the server to maintain ownership and permissions in
212           memory that can´t be stored on the server. This information can
213           disappear at any time (whenever the inode is flushed from the
214           cache), so while this may help make some applications work, it´s
215           behavior is somewhat unreliable. See the section below on FILE AND
216           DIRECTORY OWNERSHIP AND PERMISSIONS for more information.
217
218       directio
219           Do not do inode data caching on files opened on this mount. This
220           precludes mmaping files on this mount. In some cases with fast
221           networks and little or no caching benefits on the client (e.g. when
222           the application is doing large sequential reads bigger than page
223           size without rereading the same data) this can provide better
224           performance than the default behavior which caches reads
225           (readahead) and writes (writebehind) through the local Linux client
226           pagecache if oplock (caching token) is granted and held. Note that
227           direct allows write operations larger than page size to be sent to
228           the server. On some kernels this requires the cifs.ko module to be
229           built with the CIFS_EXPERIMENTAL configure option.
230
231       mapchars
232           Translate six of the seven reserved characters (not backslash, but
233           including the colon, question mark, pipe, asterik, greater than and
234           less than characters) to the remap range (above 0xF000), which also
235           allows the CIFS client to recognize files created with such
236           characters by Windows´s POSIX emulation. This can also be useful
237           when mounting to most versions of Samba (which also forbids
238           creating and opening files whose names contain any of these seven
239           characters). This has no effect if the server does not support
240           Unicode on the wire. Please note that the files created with
241           mapchars mount option may not be accessible if the share is mounted
242           without that option.
243
244       nomapchars
245           Do not translate any of these seven characters (default)
246
247       intr
248           currently unimplemented
249
250       nointr
251           (default) currently unimplemented
252
253       hard
254           The program accessing a file on the cifs mounted file system will
255           hang when the server crashes.
256
257       soft
258           (default) The program accessing a file on the cifs mounted file
259           system will not hang when the server crashes and will return errors
260           to the user application.
261
262       noacl
263           Do not allow POSIX ACL operations even if server would support
264           them.
265
266           The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to
267           Samba servers version 3.0.10 and later. Setting POSIX ACLs requires
268           enabling both XATTR and then POSIX support in the CIFS
269           configuration options when building the cifs module. POSIX ACL
270           support can be disabled on a per mount basis by specifying "noacl"
271           on mount.
272
273       nocase
274           Request case insensitive path name matching (case sensitive is the
275           default if the server suports it).
276
277       sec=
278           Security mode. Allowed values are:
279
280           ·   none attempt to connection as a null user (no name)
281
282           ·   krb5 Use Kerberos version 5 authentication
283
284           ·   krb5i Use Kerberos authentication and packet signing
285
286           ·   ntlm Use NTLM password hashing (default)
287
288           ·   ntlmi Use NTLM password hashing with signing (if
289               /proc/fs/cifs/PacketSigningEnabled on or if server requires
290               signing also can be the default)
291
292           ·   ntlmv2 Use NTLMv2 password hashing
293
294           ·   ntlmv2i Use NTLMv2 password hashing with packet signing
295
296           [NB This [sec parameter] is under development and expected to be
297           available in cifs kernel module 1.40 and later]
298
299       nobrl
300           Do not send byte range lock requests to the server. This is
301           necessary for certain applications that break with cifs style
302           mandatory byte range locks (and most cifs servers do not yet
303           support requesting advisory byte range locks).
304
305       sfu
306           When the CIFS Unix Extensions are not negotiated, attempt to create
307           device files and fifos in a format compatible with Services for
308           Unix (SFU). In addition retrieve bits 10-12 of the mode via the
309           SETFILEBITS extended attribute (as SFU does). In the future the
310           bottom 9 bits of the mode mode also will be emulated using queries
311           of the security descriptor (ACL). [NB: requires version 1.39 or
312           later of the CIFS VFS. To recognize symlinks and be able to create
313           symlinks in an SFU interoperable form requires version 1.40 or
314           later of the CIFS VFS kernel module.
315
316       serverino
317           Use inode numbers (unique persistent file identifiers) returned by
318           the server instead of automatically generating temporary inode
319           numbers on the client. Although server inode numbers make it easier
320           to spot hardlinked files (as they will have the same inode numbers)
321           and inode numbers may be persistent (which is userful for some
322           sofware), the server does not guarantee that the inode numbers are
323           unique if multiple server side mounts are exported under a single
324           share (since inode numbers on the servers might not be unique if
325           multiple filesystems are mounted under the same shared higher level
326           directory). Note that not all servers support returning server
327           inode numbers, although those that support the CIFS Unix
328           Extensions, and Windows 2000 and later servers typically do support
329           this (although not necessarily on every local server filesystem).
330           Parameter has no effect if the server lacks support for returning
331           inode numbers or equivalent.
332
333       noserverino
334           Client generates inode numbers (rather than using the actual one
335           from the server) by default.
336
337           See section INODE NUMBERS for more information.
338
339       nounix
340           Disable the CIFS Unix Extensions for this mount. This can be useful
341           in order to turn off multiple settings at once. This includes POSIX
342           acls, POSIX locks, POSIX paths, symlink support and retrieving
343           uids/gids/mode from the server. This can also be useful to work
344           around a bug in a server that supports Unix Extensions.
345
346           See section INODE NUMBERS for more information.
347
348       nouser_xattr
349           (default) Do not allow getfattr/setfattr to get/set xattrs, even if
350           server would support it otherwise.
351
352       rsize=arg
353           default network read size (usually 16K). The client currently can
354           not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize defaults
355           to 16K and may be changed (from 8K to the maximum kmalloc size
356           allowed by your kernel) at module install time for cifs.ko. Setting
357           CIFSMaxBufSize to a very large value will cause cifs to use more
358           memory and may reduce performance in some cases. To use rsize
359           greater than 127K (the original cifs protocol maximum) also
360           requires that the server support a new Unix Capability flag (for
361           very large read) which some newer servers (e.g. Samba 3.0.26 or
362           later) do. rsize can be set from a minimum of 2048 to a maximum of
363           130048 (127K or CIFSMaxBufSize, whichever is smaller)
364
365       wsize=arg
366           default network write size (default 57344) maximum wsize currently
367           allowed by CIFS is 57344 (fourteen 4096 byte pages)
368
369       fsc
370           Enable local disk caching using FS-Cache for CIFS. This option
371           could be useful to improve performance on a slow link, heavily
372           loaded server and/or network where reading from the disk is faster
373           than reading from the server (over the network). This could also
374           impact the scalability positively as the number of calls to the
375           server are reduced. But, be warned that local caching is not
376           suitable for all workloads, for e.g., read-once type workloads. So,
377           you need to consider carefully the situation/workload before using
378           this option. Currently, local disk caching is enabled for CIFS
379           files opened as read-only.
380
381           NOTE: This feature is available only in the recent kernels that
382           have been built with the kernel config option CONFIG_CIFS_FSCACHE.
383           You also need to have cachefilesd daemon installed and running to
384           make the cache operational.
385
386       multiuser
387           Map user accesses to individual credentials when accessing the
388           server. By default, CIFS mounts only use a single set of user
389           credentials (the mount credentials) when accessing a share. With
390           this option, the client instead creates a new session with the
391           server using the user's credentials whenever a new user accesses
392           the mount. Further accesses by that user will also use those
393           credentials. Because the kernel cannot prompt for passwords,
394           multiuser mounts are limited to mounts using sec= options that
395           don't require passwords.
396
397           With this change, it's feasible for the server to handle
398           permissions enforcement, so this option also implies "noperm".
399           Furthermore, when unix extensions aren't in use and the
400           administrator has not overriden ownership using the uid= or gid=
401           options, ownership of files is presented as the current user
402           accessing the share.
403
404       actimeo=arg
405           The time (in seconds) that the CIFS client caches attributes of a
406           file or directory before it requests attribute information from a
407           server. During this period the changes that occur on the server
408           remain undetected until the client checks the server again.
409
410           By default, the attribute cache timeout is set to 1 second. This
411           means more frequent on-the-wire calls to the server to check
412           whether attributes have changed which could impact performance.
413           With this option users can make a tradeoff between performance and
414           cache metadata correctness, depending on workload needs. Shorter
415           timeouts mean better cache coherency, but frequent increased number
416           of calls to the server. Longer timeouts mean a reduced number of
417           calls to the server but looser cache coherency. The actimeo value
418           is a positive integer that can hold values between 0 and a maximum
419           value of 2^30 * HZ (frequency of timer interrupt) setting.
420
421       --verbose
422           Print additional debugging information for the mount. Note that
423           this parameter must be specified before the -o. For example:
424
425           mount -t cifs //server/share /mnt --verbose -o user=username
426

SERVICE FORMATTING AND DELIMITERS

428       It´s generally preferred to use forward slashes (/) as a delimiter in
429       service names. They are considered to be the "universal delimiter"
430       since they are generally not allowed to be embedded within path
431       components on Windows machines and the client can convert them to
432       blackslashes (\) unconditionally. Conversely, backslash characters are
433       allowed by POSIX to be part of a path component, and can´t be
434       automatically converted in the same way.
435
436       mount.cifs will attempt to convert backslashes to forward slashes where
437       it´s able to do so, but it cannot do so in any path component following
438       the sharename.
439

INODE NUMBERS

441       When Unix Extensions are enabled, we use the actual inode number
442       provided by the server in response to the POSIX calls as an inode
443       number.
444
445       When Unix Extensions are disabled and "serverino" mount option is
446       enabled there is no way to get the server inode number. The client
447       typically maps the server-assigned "UniqueID" onto an inode number.
448
449       Note that the UniqueID is a different value from the server inode
450       number. The UniqueID value is unique over the scope of the entire
451       server and is often greater than 2 power 32. This value often makes
452       programs that are not compiled with LFS (Large File Support), to
453       trigger a glibc EOVERFLOW error as this won´t fit in the target
454       structure field. It is strongly recommended to compile your programs
455       with LFS support (i.e. with -D_FILE_OFFSET_BITS=64) to prevent this
456       problem. You can also use "noserverino" mount option to generate inode
457       numbers smaller than 2 power 32 on the client. But you may not be able
458       to detect hardlinks properly.
459

FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS

461       The core CIFS protocol does not provide unix ownership information or
462       mode for files and directories. Because of this, files and directories
463       will generally appear to be owned by whatever values the uid= or gid=
464       options are set, and will have permissions set to the default file_mode
465       and dir_mode for the mount. Attempting to change these values via
466       chmod/chown will return success but have no effect.
467
468       When the client and server negotiate unix extensions, files and
469       directories will be assigned the uid, gid, and mode provided by the
470       server. Because CIFS mounts are generally single-user, and the same
471       credentials are used no matter what user accesses the mount, newly
472       created files and directories will generally be given ownership
473       corresponding to whatever credentials were used to mount the share.
474
475       If the uid´s and gid´s being used do not match on the client and
476       server, the forceuid and forcegid options may be helpful. Note however,
477       that there is no corresponding option to override the mode. Permissions
478       assigned to a file when forceuid or forcegid are in effect may not
479       reflect the the real permissions.
480
481       When unix extensions are not negotiated, it´s also possible to emulate
482       them locally on the server using the "dynperm" mount option. When this
483       mount option is in effect, newly created files and directories will
484       receive what appear to be proper permissions. These permissions are not
485       stored on the server however and can disappear at any time in the
486       future (subject to the whims of the kernel flushing out the inode
487       cache). In general, this mount option is discouraged.
488
489       It´s also possible to override permission checking on the client
490       altogether via the noperm option. Server-side permission checks cannot
491       be overriden. The permission checks done by the server will always
492       correspond to the credentials used to mount the share, and not
493       necessarily to the user who is accessing the share.
494

ENVIRONMENT VARIABLES

496       The variable USER may contain the username of the person to be used to
497       authenticate to the server. The variable can be used to set both
498       username and password by using the format username%password.
499
500       The variable PASSWD may contain the password of the person using the
501       client.
502
503       The variable PASSWD_FILE may contain the pathname of a file to read the
504       password from. A single line of input is read and used as the password.
505

NOTES

507       This command may be used only by root, unless installed setuid, in
508       which case the noeexec and nosuid mount flags are enabled. When
509       installed as a setuid program, the program follows the conventions set
510       forth by the mount program for user mounts.
511
512       Some samba client tools like smbclient(8) honour client-side
513       configuration parameters present in smb.conf. Unlike those client
514       tools, mount.cifs ignores smb.conf completely.
515

CONFIGURATION

517       The primary mechanism for making configuration changes and for reading
518       debug information for the cifs vfs is via the Linux /proc filesystem.
519       In the directory /proc/fs/cifs are various configuration files and
520       pseudo files which can display debug information. There are additional
521       startup options such as maximum buffer size and number of buffers which
522       only may be set when the kernel cifs vfs (cifs.ko module) is loaded.
523       These can be seen by running the modinfo utility against the file
524       cifs.ko which will list the options that may be passed to cifs during
525       module installation (device driver load). For more information see the
526       kernel file fs/cifs/README.
527

BUGS

529       Mounting using the CIFS URL specification is currently not supported.
530
531       The credentials file does not handle usernames or passwords with
532       leading space.
533
534       Note that the typical response to a bug report is a suggestion to try
535       the latest version first. So please try doing that first, and always
536       include which versions you use of relevant software when reporting bugs
537       (minimum: mount.cifs (try mount.cifs -V), kernel (see /proc/version)
538       and server type you are trying to contact.
539

VERSION

541       This man page is correct for version 1.52 of the cifs vfs filesystem
542       (roughly Linux kernel 2.6.24).
543

SEE ALSO

545       Documentation/filesystems/cifs.txt and fs/cifs/README in the linux
546       kernel source tree may contain additional options and information.
547
548       cifs.upcall(8)
549

AUTHOR

551       Steve French
552
553       The syntax and manpage were loosely based on that of smbmount. It was
554       converted to Docbook/XML by Jelmer Vernooij.
555
556       The maintainer of the Linux cifs vfs and the userspace tool mount.cifs
557       is Steve French. The Linux CIFS Mailing list is the preferred place to
558       ask questions regarding these programs.
559
560
561
562cifs-utils 4.0                    02/07/2010                     MOUNT.CIFS(8)
Impressum