요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Session identity와 I/O 성능 option
usage.rst:276-392Username·domain·UID/GID·mode의 결정 과정과 FS-Cache, transfer size, Unicode codepage, attribute cache timeout의 tradeoff를 설명합니다.
Permission, inode, cache와 metadata
usage.rst:393-559Mountpoint 실행 policy, credential helper, client permission, server inode, create owner, page cache, ACL, xattr와 reserved character mapping option을 다룹니다.
Path, locking과 protocol security
usage.rst:560-707POSIX path, Unix Extensions, byte-range locking, fsync, DFS, legacy compatibility, signing·encryption·authentication 및 retry option을 설명합니다.
Procfs 진단과 module parameter
usage.rst:708-864`/proc/fs/cifs`의 session·statistics·security·trace interface, Kerberos와 DFS upcall, keyutils 및 sysfs module parameter를 정리합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=====
Usage
=====
This module supports the SMB3 family of advanced network protocols (as well
as older dialects, originally called "CIFS" or SMB1).
The CIFS VFS module for Linux supports many advanced network filesystem
features such as hierarchical DFS like namespace, hardlinks, locking and more.
It was designed to comply with the SNIA CIFS Technical Reference (which
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
practical interoperability with Windows 2000, Windows XP, Samba and equivalent
servers. This code was developed in participation with the Protocol Freedom
Information Foundation. CIFS and now SMB3 has now become a defacto
standard for interoperating between Macs and Windows and major NAS appliances.
Please see
MS-SMB2 (for detailed SMB2/SMB3/SMB3.1.1 protocol specification)
or https://samba.org/samba/PFIF/
for more details.
For questions or bug reports please contact:
smfrench@gmail.com
See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
Build instructions
==================
For Linux:
1) Download the kernel (e.g. from https://www.kernel.org)
and change directory into the top of the kernel directory tree
(e.g. /usr/src/linux-2.5.73)
2) make menuconfig (or make xconfig)
3) select cifs from within the network filesystem choices
4) save and exit
5) make
Installation instructions
=========================
If you have built the CIFS vfs as module (successfully) simply
type ``make modules_install`` (or if you prefer, manually copy the file to
the modules directory e.g. /lib/modules/6.3.0-060300-generic/kernel/fs/smb/client/cifs.ko).
If you have built the CIFS vfs into the kernel itself, follow the instructions
for your distribution on how to install a new kernel (usually you
would simply type ``make install``).
If you do not have the utility mount.cifs (in the Samba 4.x source tree and on
the CIFS VFS web site) copy it to the same directory in which mount helpers
reside (usually /sbin). Although the helper software is not
required, mount.cifs is recommended. Most distros include a ``cifs-utils``
package that includes this utility so it is recommended to install this.
Note that running the Winbind pam/nss module (logon service) on all of your
Linux clients is useful in mapping Uids and Gids consistently across the
domain to the proper network user. The mount.cifs mount helper can be
found at cifs-utils.git on git.samba.org
If cifs is built as a module, then the size and number of network buffers
and maximum number of simultaneous requests to one server can be configured.
Changing these from their defaults is not recommended. By executing modinfo::
modinfo <path to cifs.ko>
on kernel/fs/smb/client/cifs.ko the list of configuration changes that can be made
at module initialization time (by running insmod cifs.ko) can be seen.
Recommendations
===============
To improve security the SMB2.1 dialect or later (usually will get SMB3.1.1) is now
the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0"
on mount (or vers=2.0 for Windows Vista). Note that the CIFS (vers=1.0) is
much older and less secure than the default dialect SMB3 which includes
many advanced security features such as downgrade attack detection
and encrypted shares and stronger signing and authentication algorithms.
There are additional mount options that may be helpful for SMB3 to get
improved POSIX behavior (NB: can use vers=3 to force SMB3 or later, never 2.1):
``mfsymlinks`` and either ``cifsacl`` or ``modefromsid`` (usually with ``idsfromsid``)
Allowing User Mounts
====================
To permit users to mount and unmount over directories they own is possible
with the cifs vfs. A way to enable such mounting is to mark the mount.cifs
utility as suid (e.g. ``chmod +s /sbin/mount.cifs``). To enable users to
umount shares they mount requires
1) mount.cifs version 1.4 or later
2) an entry for the share in /etc/fstab indicating that a user may
unmount it e.g.::
//server/usersharename /mnt/username cifs user 0 0
Note that when the mount.cifs utility is run suid (allowing user mounts),
in order to reduce risks, the ``nosuid`` mount flag is passed in on mount to
disallow execution of an suid program mounted on the remote target.
When mount is executed as root, nosuid is not passed in by default,
and execution of suid programs on the remote target would be enabled
by default. This can be changed, as with nfs and other filesystems,
by simply specifying ``nosuid`` among the mount options. For user mounts
though to be able to pass the suid flag to mount requires rebuilding
mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
There is a corresponding manual page for cifs mounting in the Samba 3.0 and
later source tree in docs/manpages/mount.cifs.8
Allowing User Unmounts
======================
To permit users to unmount directories that they have user mounted (see above),
the utility umount.cifs may be used. It may be invoked directly, or if
umount.cifs is placed in /sbin, umount can invoke the cifs umount helper
(at least for most versions of the umount utility) for umount of cifs
mounts, unless umount is invoked with -i (which will avoid invoking a umount
helper). As with mount.cifs, to enable user unmounts umount.cifs must be marked
as suid (e.g. ``chmod +s /sbin/umount.cifs``) or equivalent (some distributions
allow adding entries to a file to the /etc/permissions file to achieve the
equivalent suid effect). For this utility to succeed the target path
must be a cifs mount, and the uid of the current user must match the uid
of the user who mounted the resource.
Also note that the customary way of allowing user mounts and unmounts is
(instead of using mount.cifs and unmount.cifs as suid) to add a line
to the file /etc/fstab for each //server/share you wish to mount, but
this can become unwieldy when potential mount targets include many
or unpredictable UNC names.
Samba Considerations
====================
Most current servers support SMB2.1 and SMB3 which are more secure,
but there are useful protocol extensions for the older less secure CIFS
dialect, so to get the maximum benefit if mounting using the older dialect
(CIFS/SMB1), we recommend using a server that supports the SNIA CIFS
Unix Extensions standard (e.g. almost any version of Samba ie version
2.2.5 or later) but the CIFS vfs works fine with a wide variety of CIFS servers.
Note that uid, gid and file permissions will display default values if you do
not have a server that supports the Unix extensions for CIFS (such as Samba
2.2.5 or later). To enable the Unix CIFS Extensions in the Samba server, add
the line::
unix extensions = yes
to your smb.conf file on the server. Note that the following smb.conf settings
are also useful (on the Samba server) when the majority of clients are Unix or
Linux::
case sensitive = yes
delete readonly = yes
ea support = yes
Note that server ea support is required for supporting xattrs from the Linux
cifs client, and that EA support is present in later versions of Samba (e.g.
3.0.6 and later (also EA support works in all versions of Windows, at least to
shares on NTFS filesystems). Extended Attribute (xattr) support is an optional
feature of most Linux filesystems which may require enabling via
make menuconfig. Client support for extended attributes (user xattr) can be
disabled on a per-mount basis by specifying ``nouser_xattr`` on mount.
The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
version 3.10 and later. Setting POSIX ACLs requires enabling both XATTR and
then POSIX support in the CIFS configuration options when building the cifs
module. POSIX ACL support can be disabled on a per mount basic by specifying
``noacl`` on mount.
Some administrators may want to change Samba's smb.conf ``map archive`` and
``create mask`` parameters from the default. Unless the create mask is changed
newly created files can end up with an unnecessarily restrictive default mode,
which may not be what you want, although if the CIFS Unix extensions are
enabled on the server and client, subsequent setattr calls (e.g. chmod) can
fix the mode. Note that creating special devices (mknod) remotely
may require specifying a mkdev function to Samba if you are not using
Samba 3.0.6 or later. For more information on these see the manual pages
(``man smb.conf``) on the Samba server system. Note that the cifs vfs,
unlike the smbfs vfs, does not read the smb.conf on the client system
(the few optional settings are passed in on mount via -o parameters instead).
Note that Samba 2.2.7 or later includes a fix that allows the CIFS VFS to delete
open files (required for strict POSIX compliance). Windows Servers already
supported this feature. Samba server does not allow symlinks that refer to files
outside of the share, so in Samba versions prior to 3.0.6, most symlinks to
files with absolute paths (ie beginning with slash) such as::
ln -s /mnt/foo bar
would be forbidden. Samba 3.0.6 server or later includes the ability to create
such symlinks safely by converting unsafe symlinks (ie symlinks to server
files that are outside of the share) to a samba specific format on the server
that is ignored by local server applications and non-cifs clients and that will
not be traversed by the Samba server). This is opaque to the Linux client
application using the cifs vfs. Absolute symlinks will work to Samba 3.0.5 or
later, but only for remote clients using the CIFS Unix extensions, and will
be invisible to Windows clients and typically will not affect local
applications running on the same server as Samba.
Use instructions
================
Once the CIFS VFS support is built into the kernel or installed as a module
(cifs.ko), you can use mount syntax like the following to access Samba or
Mac or Windows servers::
mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword
Before -o the option -v may be specified to make the mount.cifs
mount helper display the mount steps more verbosely.
After -o the following commonly used cifs vfs specific options
are supported::
username=<username>
password=<password>
domain=<domain name>
Other cifs mount options are described below. Use of TCP names (in addition to
ip addresses) is available if the mount helper (mount.cifs) is installed. If
you do not trust the server to which are mounted, or if you do not have
cifs signing enabled (and the physical network is insecure), consider use
of the standard mount options ``noexec`` and ``nosuid`` to reduce the risk of
running an altered binary on your local system (downloaded from a hostile server
or altered by a hostile router).
Although mounting using format corresponding to the CIFS URL specification is
not possible in mount.cifs yet, it is possible to use an alternate format
for the server and sharename (which is somewhat similar to NFS style mount
syntax) instead of the more widely used UNC format (i.e. \\server\share)::
mount -t cifs tcp_name_of_server:share_name /mnt -o user=myname,pass=mypasswd
When using the mount helper mount.cifs, passwords may be specified via alternate
mechanisms, instead of specifying it after -o using the normal ``pass=`` syntax
on the command line:
1) By including it in a credential file. Specify credentials=filename as one
of the mount options. Credential files contain two lines::
username=someuser
password=your_password
2) By specifying the password in the PASSWD environment variable (similarly
the user name can be taken from the USER environment variable).
3) By specifying the password in a file by name via PASSWD_FILE
4) By specifying the password in a file by file descriptor via PASSWD_FD
If no password is provided, mount.cifs will prompt for password entry
Restrictions
============
Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC
1001/1002 support for "Netbios-Over-TCP/IP." This is not likely to be a
problem as most servers support this.
Valid filenames differ between Windows and Linux. Windows typically restricts
filenames which contain certain reserved characters (e.g.the character :
which is used to delimit the beginning of a stream name by Windows), while
Linux allows a slightly wider set of valid characters in filenames. Windows
servers can remap such characters when an explicit mapping is specified in
the Server's registry. Samba starting with version 3.10 will allow such
filenames (ie those which contain valid Linux characters, which normally
would be forbidden for Windows/CIFS semantics) as long as the server is
configured for Unix Extensions (and the client has not disabled
/proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
``mapposix`` can be used on CIFS (vers=1.0) to force the mapping of
illegal Windows/NTFS/SMB characters to a remap range (this mount parameter
is the default for SMB3). This remap (``mapposix``) range is also
compatible with Mac (and "Services for Mac" on some older Windows).
When POSIX Extensions for SMB 3.1.1 are negotiated, remapping is automatically
disabled.
CIFS VFS Mount Options
======================
A partial list of the supported mount options follows:
username
The user name to use when trying to establish
the CIFS session.
password
The user password. If the mount helper is
installed, the user will be prompted for password
if not supplied.
ip
The ip address of the target server
unc
The target server Universal Network Name (export) to
mount.
domain
Set the SMB/CIFS workgroup name prepended to the
username during CIFS session establishment
forceuid
Set the default uid for inodes to the uid
passed in on mount. For mounts to servers
which do support the CIFS Unix extensions, such as a
properly configured Samba server, the server provides
the uid, gid and mode so this parameter should not be
specified unless the server and clients uid and gid
numbering differ. If the server and client are in the
same domain (e.g. running winbind or nss_ldap) and
the server supports the Unix Extensions then the uid
and gid can be retrieved from the server (and uid
and gid would not have to be specified on the mount.
For servers which do not support the CIFS Unix
extensions, the default uid (and gid) returned on lookup
of existing files will be the uid (gid) of the person
who executed the mount (root, except when mount.cifs
is configured setuid for user mounts) unless the ``uid=``
(gid) mount option is specified. Also note that permission
checks (authorization checks) on accesses to a file occur
at the server, but there are cases in which an administrator
may want to restrict at the client as well. For those
servers which do not report a uid/gid owner
(such as Windows), permissions can also be checked at the
client, and a crude form of client side permission checking
can be enabled by specifying file_mode and dir_mode on
the client. (default)
forcegid
(similar to above but for the groupid instead of uid) (default)
noforceuid
Fill in file owner information (uid) by requesting it from
the server if possible. With this option, the value given in
the uid= option (on mount) will only be used if the server
can not support returning uids on inodes.
noforcegid
(similar to above but for the group owner, gid, instead of uid)
uid
Set the default uid for inodes, and indicate to the
cifs kernel driver which local user mounted. If the server
supports the unix extensions the default uid is
not used to fill in the owner fields of inodes (files)
unless the ``forceuid`` parameter is specified.
gid
Set the default gid for inodes (similar to above).
file_mode
If CIFS Unix extensions are not supported by the server
this overrides the default mode for file inodes.
fsc
Enable local disk caching using FS-Cache (off by default). This
option could be useful to improve performance on a slow link,
heavily loaded server and/or network where reading from the
disk is faster than reading from the server (over the network).
This could also impact scalability positively as the
number of calls to the server are reduced. However, local
caching is not suitable for all workloads for e.g. read-once
type workloads. So, you need to consider carefully your
workload/scenario before using this option. Currently, local
disk caching is functional for CIFS files opened as read-only.
dir_mode
If CIFS Unix extensions are not supported by the server
this overrides the default mode for directory inodes.
port
attempt to contact the server on this tcp port, before
trying the usual ports (port 445, then 139).
iocharset
Codepage used to convert local path names to and from
Unicode. Unicode is used by default for network path
names if the server supports it. If iocharset is
not specified then the nls_default specified
during the local client kernel build will be used.
If server does not support Unicode, this parameter is
unused.
rsize
default read size (usually 16K). The client currently
can not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize
defaults to 16K and may be changed (from 8K to the maximum
kmalloc size allowed by your kernel) at module install time
for cifs.ko. Setting CIFSMaxBufSize to a very large value
will cause cifs to use more memory and may reduce performance
in some cases. To use rsize greater than 127K (the original
cifs protocol maximum) also requires that the server support
a new Unix Capability flag (for very large read) which some
newer servers (e.g. Samba 3.0.26 or later) do. rsize can be
set from a minimum of 2048 to a maximum of 130048 (127K or
CIFSMaxBufSize, whichever is smaller)
wsize
default write size (default 57344)
maximum wsize currently allowed by CIFS is 57344 (fourteen
4096 byte pages)
actimeo=n
attribute cache timeout in seconds (default 1 second).
After this timeout, the cifs client requests fresh attribute
information from the server. This option allows to tune the
attribute cache timeout to suit the workload needs. Shorter
timeouts mean better the cache coherency, but increased number
of calls to the server. Longer timeouts mean reduced number
of calls to the server at the expense of less stricter cache
coherency checks (i.e. incorrect attribute cache for a short
period of time).
rw
mount the network share read-write (note that the
server may still consider the share read-only)
ro
mount network share read-only
version
used to distinguish different versions of the
mount helper utility (not typically needed)
sep
if first mount option (after the -o), overrides
the comma as the separator between the mount
parameters. e.g.::
-o user=myname,password=mypassword,domain=mydom
could be passed instead with period as the separator by::
-o sep=.user=myname.password=mypassword.domain=mydom
this might be useful when comma is contained within username
or password or domain. This option is less important
when the cifs mount helper cifs.mount (version 1.1 or later)
is used.
nosuid
Do not allow remote executables with the suid bit
program to be executed. This is only meaningful for mounts
to servers such as Samba which support the CIFS Unix Extensions.
If you do not trust the servers in your network (your mount
targets) it is recommended that you specify this option for
greater security.
exec
Permit execution of binaries on the mount.
noexec
Do not permit execution of binaries on the mount.
dev
Recognize block devices on the remote mount.
nodev
Do not recognize devices on the remote mount.
suid
Allow remote files on this mountpoint with suid enabled to
be executed (default for mounts when executed as root,
nosuid is default for user mounts).
credentials
Although ignored by the cifs kernel component, it is used by
the mount helper, mount.cifs. When mount.cifs is installed it
opens and reads the credential file specified in order
to obtain the userid and password arguments which are passed to
the cifs vfs.
guest
Although ignored by the kernel component, the mount.cifs
mount helper will not prompt the user for a password
if guest is specified on the mount options. If no
password is specified a null password will be used.
perm
Client does permission checks (vfs_permission check of uid
and gid of the file against the mode and desired operation),
Note that this is in addition to the normal ACL check on the
target machine done by the server software.
Client permission checking is enabled by default.
noperm
Client does not do permission checks. This can expose
files on this mount to access by other users on the local
client system. It is typically only needed when the server
supports the CIFS Unix Extensions but the UIDs/GIDs on the
client and server system do not match closely enough to allow
access by the user doing the mount, but it may be useful with
non CIFS Unix Extension mounts for cases in which the default
mode is specified on the mount but is not to be enforced on the
client (e.g. perhaps when MultiUserMount is enabled)
Note that this does not affect the normal ACL check on the
target machine done by the server software (of the server
ACL against the user name provided at mount time).
serverino
Use server's inode numbers instead of generating automatically
incrementing inode numbers on the client. Although this will
make it easier to spot hardlinked files (as they will have
the same inode numbers) and inode numbers may be persistent,
note that the server does not guarantee that the inode numbers
are unique if multiple server side mounts are exported under a
single share (since inode numbers on the servers might not
be unique if multiple filesystems are mounted under the same
shared higher level directory). Note that some older
(e.g. pre-Windows 2000) do not support returning UniqueIDs
or the CIFS Unix Extensions equivalent and for those
this mount option will have no effect. Exporting cifs mounts
under nfsd requires this mount option on the cifs mount.
This is now the default if server supports the
required network operation.
noserverino
Client generates inode numbers (rather than using the actual one
from the server). These inode numbers will vary after
unmount or reboot which can confuse some applications,
but not all server filesystems support unique inode
numbers.
setuids
If the CIFS Unix extensions are negotiated with the server
the client will attempt to set the effective uid and gid of
the local process on newly created files, directories, and
devices (create, mkdir, mknod). If the CIFS Unix Extensions
are not negotiated, for newly created files and directories
instead of using the default uid and gid specified on
the mount, cache the new file's uid and gid locally which means
that the uid for the file can change when the inode is
reloaded (or the user remounts the share).
nosetuids
The client will not attempt to set the uid and gid on
on newly created files, directories, and devices (create,
mkdir, mknod) which will result in the server setting the
uid and gid to the default (usually the server uid of the
user who mounted the share). Letting the server (rather than
the client) set the uid and gid is the default. If the CIFS
Unix Extensions are not negotiated then the uid and gid for
new files will appear to be the uid (gid) of the mounter or the
uid (gid) parameter specified on the mount.
netbiosname
When mounting to servers via port 139, specifies the RFC1001
source name to use to represent the client netbios machine
name when doing the RFC1001 netbios session initialize.
direct
Do not do inode data caching on files opened on this mount.
This precludes mmapping files on this mount. In some cases
with fast networks and little or no caching benefits on the
client (e.g. when the application is doing large sequential
reads bigger than page size without rereading the same data)
this can provide better performance than the default
behavior which caches reads (readahead) and writes
(writebehind) through the local Linux client pagecache
if oplock (caching token) is granted and held. Note that
direct allows write operations larger than page size
to be sent to the server.
strictcache
Use for switching on strict cache mode. In this mode the
client read from the cache all the time it has Oplock Level II,
otherwise - read from the server. All written data are stored
in the cache, but if the client doesn't have Exclusive Oplock,
it writes the data to the server.
rwpidforward
Forward pid of a process who opened a file to any read or write
operation on that file. This prevent applications like WINE
from failing on read and write if we use mandatory brlock style.
acl
Allow setfacl and getfacl to manage posix ACLs if server
supports them. (default)
noacl
Do not allow setfacl and getfacl calls on this mount
user_xattr
Allow getting and setting user xattrs (those attributes whose
name begins with ``user.`` or ``os2.``) as OS/2 EAs (extended
attributes) to the server. This allows support of the
setfattr and getfattr utilities. (default)
nouser_xattr
Do not allow getfattr/setfattr to get/set/list xattrs
mapchars
Translate six of the seven reserved characters (not backslash)::
*?<>|:
to the remap range (above 0xF000), which also
allows the CIFS client to recognize files created with
such characters by Windows's POSIX emulation. This can
also be useful when mounting to most versions of Samba
(which also forbids creating and opening files
whose names contain any of these seven characters).
This has no effect if the server does not support
Unicode on the wire.
nomapchars
Do not translate any of these seven characters (default).
nocase
Request case insensitive path name matching (case
sensitive is the default if the server supports it).
(mount option ``ignorecase`` is identical to ``nocase``)
posixpaths
If CIFS Unix extensions are supported, attempt to
negotiate posix path name support which allows certain
characters forbidden in typical CIFS filenames, without
requiring remapping. (default)
noposixpaths
If CIFS Unix extensions are supported, do not request
posix path name support (this may cause servers to
reject creatingfile with certain reserved characters).
nounix
Disable the CIFS Unix Extensions for this mount (tree
connection). This is rarely needed, but it may be useful
in order to turn off multiple settings all at once (ie
posix acls, posix locks, posix paths, symlink support
and retrieving uids/gids/mode from the server) or to
work around a bug in server which implement the Unix
Extensions.
nobrl
Do not send byte range lock requests to the server.
This is necessary for certain applications that break
with cifs style mandatory byte range locks (and most
cifs servers do not yet support requesting advisory
byte range locks).
forcemandatorylock
Even if the server supports posix (advisory) byte range
locking, send only mandatory lock requests. For some
(presumably rare) applications, originally coded for
DOS/Windows, which require Windows style mandatory byte range
locking, they may be able to take advantage of this option,
forcing the cifs client to only send mandatory locks
even if the cifs server would support posix advisory locks.
``forcemand`` is accepted as a shorter form of this mount
option.
nostrictsync
If this mount option is set, when an application does an
fsync call then the cifs client does not send an SMB Flush
to the server (to force the server to write all dirty data
for this file immediately to disk), although cifs still sends
all dirty (cached) file data to the server and waits for the
server to respond to the write. Since SMB Flush can be
very slow, and some servers may be reliable enough (to risk
delaying slightly flushing the data to disk on the server),
turning on this option may be useful to improve performance for
applications that fsync too much, at a small risk of server
crash. If this mount option is not set, by default cifs will
send an SMB flush request (and wait for a response) on every
fsync call.
nodfs
Disable DFS (global name space support) even if the
server claims to support it. This can help work around
a problem with parsing of DFS paths with Samba server
versions 3.0.24 and 3.0.25.
remount
remount the share (often used to change from ro to rw mounts
or vice versa)
cifsacl
Report mode bits (e.g. on stat) based on the Windows ACL for
the file. (EXPERIMENTAL)
servern
Specify the server 's netbios name (RFC1001 name) to use
when attempting to setup a session to the server.
This is needed for mounting to some older servers (such
as OS/2 or Windows 98 and Windows ME) since they do not
support a default server name. A server name can be up
to 15 characters long and is usually uppercased.
sfu
When the CIFS Unix Extensions are not negotiated, attempt to
create device files and fifos in a format compatible with
Services for Unix (SFU). In addition retrieve bits 10-12
of the mode via the SETFILEBITS extended attribute (as
SFU does). In the future the bottom 9 bits of the
mode also will be emulated using queries of the security
descriptor (ACL).
mfsymlinks
Enable support for Minshall+French symlinks
(see http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks)
This option is ignored when specified together with the
'sfu' option. Minshall+French symlinks are used even if
the server supports the CIFS Unix Extensions.
sign
Must use packet signing (helps avoid unwanted data modification
by intermediate systems in the route). Note that signing
does not work with lanman or plaintext authentication.
seal
Must seal (encrypt) all data on this mounted share before
sending on the network. Requires support for Unix Extensions.
Note that this differs from the sign mount option in that it
causes encryption of data sent over this mounted share but other
shares mounted to the same server are unaffected.
locallease
This option is rarely needed. Fcntl F_SETLEASE is
used by some applications such as Samba and NFSv4 server to
check to see whether a file is cacheable. CIFS has no way
to explicitly request a lease, but can check whether a file
is cacheable (oplocked). Unfortunately, even if a file
is not oplocked, it could still be cacheable (ie cifs client
could grant fcntl leases if no other local processes are using
the file) for cases for example such as when the server does not
support oplocks and the user is sure that the only updates to
the file will be from this client. Specifying this mount option
will allow the cifs client to check for leases (only) locally
for files which are not oplocked instead of denying leases
in that case. (EXPERIMENTAL)
sec
Security mode. Allowed values are:
none
attempt to connection as a null user (no name)
krb5
Use Kerberos version 5 authentication
krb5i
Use Kerberos authentication and packet signing
ntlm
Use NTLM password hashing (default)
ntlmi
Use NTLM password hashing with signing (if
/proc/fs/cifs/PacketSigningEnabled on or if
server requires signing also can be the default)
ntlmv2
Use NTLMv2 password hashing
ntlmv2i
Use NTLMv2 password hashing with packet signing
lanman
(if configured in kernel config) use older
lanman hash
hard
Retry file operations if server is not responding
soft
Limit retries to unresponsive servers (usually only
one retry) before returning an error. (default)
The mount.cifs mount helper also accepts a few mount options before -o
including:
=============== ===============================================================
-S take password from stdin (equivalent to setting the environment
variable ``PASSWD_FD=0``
-V print mount.cifs version
-? display simple usage information
=============== ===============================================================
With most 2.6 kernel versions of modutils, the version of the cifs kernel
module can be displayed via modinfo.
Misc /proc/fs/cifs Flags and Debug Info
=======================================
Informational pseudo-files:
======================= =======================================================
DebugData Displays information about active CIFS sessions and
shares, features enabled as well as the cifs.ko
version.
Stats Lists summary resource usage information as well as per
share statistics.
open_files List all the open file handles on all active SMB sessions.
mount_params List of all mount parameters available for the module
======================= =======================================================
Configuration pseudo-files:
======================= =======================================================
SecurityFlags Flags which control security negotiation and
also packet signing. Authentication (may/must)
flags (e.g. for NTLMv2) may be combined with
the signing flags. Specifying two different password
hashing mechanisms (as "must use") on the other hand
does not make much sense. Default flags are::
0x00C5
(NTLMv2 and packet signing allowed). Some SecurityFlags
may require enabling a corresponding menuconfig option.
may use packet signing 0x00001
must use packet signing 0x01001
may use NTLMv2 0x00004
must use NTLMv2 0x04004
may use Kerberos security (krb5) 0x00008
must use Kerberos 0x08008
may use NTLMSSP 0x00080
must use NTLMSSP 0x80080
seal (packet encryption) 0x00040
must seal 0x40040
cifsFYI If set to non-zero value, additional debug information
will be logged to the system error log. This field
contains three flags controlling different classes of
debugging entries. The maximum value it can be set
to is 7 which enables all debugging points (default 0).
Some debugging statements are not compiled into the
cifs kernel unless CONFIG_CIFS_DEBUG2 is enabled in the
kernel configuration. cifsFYI may be set to one or
more of the following flags (7 sets them all)::
+-----------------------------------------------+------+
| log cifs informational messages | 0x01 |
+-----------------------------------------------+------+
| log return codes from cifs entry points | 0x02 |
+-----------------------------------------------+------+
| log slow responses | 0x04 |
| (ie which take longer than 1 second) | |
| | |
| CONFIG_CIFS_STATS2 must be enabled in .config | |
+-----------------------------------------------+------+
traceSMB If set to one, debug information is logged to the
system error log with the start of smb requests
and responses (default 0)
LookupCacheEnable If set to one, inode information is kept cached
for one second improving performance of lookups
(default 1)
LinuxExtensionsEnabled If set to one then the client will attempt to
use the CIFS "UNIX" extensions which are optional
protocol enhancements that allow CIFS servers
to return accurate UID/GID information as well
as support symbolic links. If you use servers
such as Samba that support the CIFS Unix
extensions but do not want to use symbolic link
support and want to map the uid and gid fields
to values supplied at mount (rather than the
actual values, then set this to zero. (default 1)
dfscache List the content of the DFS cache.
If set to 0, the client will clear the cache.
======================= =======================================================
These experimental features and tracing can be enabled by changing flags in
/proc/fs/cifs (after the cifs module has been installed or built into the
kernel, e.g. insmod cifs). To enable a feature set it to 1 e.g. to enable
tracing to the kernel message log type::
echo 7 > /proc/fs/cifs/cifsFYI
cifsFYI functions as a bit mask. Setting it to 1 enables additional kernel
logging of various informational messages. 2 enables logging of non-zero
SMB return codes while 4 enables logging of requests that take longer
than one second to complete (except for byte range lock requests).
Setting it to 4 requires CONFIG_CIFS_STATS2 to be set in kernel configuration
(.config). Setting it to seven enables all three. Finally, tracing
the start of smb requests and responses can be enabled via::
echo 1 > /proc/fs/cifs/traceSMB
Per share (per client mount) statistics are available in /proc/fs/cifs/Stats.
Additional information is available if CONFIG_CIFS_STATS2 is enabled in the
kernel configuration (.config). The statistics returned include counters which
represent the number of attempted and failed (ie non-zero return code from the
server) SMB3 (or cifs) requests grouped by request type (read, write, close etc.).
Also recorded is the total bytes read and bytes written to the server for
that share. Note that due to client caching effects this can be less than the
number of bytes read and written by the application running on the client.
Statistics can be reset to zero by ``echo 0 > /proc/fs/cifs/Stats`` which may be
useful if comparing performance of two different scenarios.
Also note that ``cat /proc/fs/cifs/DebugData`` will display information about
the active sessions and the shares that are mounted.
Enabling Kerberos (extended security) works but requires version 1.2 or later
of the helper program cifs.upcall to be present and to be configured in the
/etc/request-key.conf file. The cifs.upcall helper program is from the Samba
project(https://www.samba.org). NTLM and NTLMv2 and LANMAN support do not
require this helper. Note that NTLMv2 security (which does not require the
cifs.upcall helper program), instead of using Kerberos, is sufficient for
some use cases.
DFS support allows transparent redirection to shares in an MS-DFS name space.
In addition, DFS support for target shares which are specified as UNC
names which begin with host names (rather than IP addresses) requires
a user space helper (such as cifs.upcall) to be present in order to
translate host names to ip address, and the user space helper must also
be configured in the file /etc/request-key.conf. Samba, Windows servers and
many NAS appliances support DFS as a way of constructing a global name
space to ease network configuration and improve reliability.
To use cifs Kerberos and DFS support, the Linux keyutils package should be
installed and something like the following lines should be added to the
/etc/request-key.conf file::
create cifs.spnego * * /usr/local/sbin/cifs.upcall %k
create dns_resolver * * /usr/local/sbin/cifs.upcall %k
CIFS kernel module parameters
=============================
These module parameters can be specified or modified either during the time of
module loading or during the runtime by using the interface::
/sys/module/cifs/parameters/<param>
i.e.::
echo "value" > /sys/module/cifs/parameters/<param>
More detailed descriptions of the available module parameters and their values
can be seen by doing:
modinfo cifs (or modinfo smb3)
================= ==========================================================
1. enable_oplocks Enable or disable oplocks. Oplocks are enabled by default.
[Y/y/1]. To disable use any of [N/n/0].
================= ==========================================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 protocol, interoperability와 project 정보
1-28이 module은 고급 network protocol인 SMB3 계열과, 원래 CIFS 또는 SMB1이라고 불렸던 이전 dialect를 지원합니다.
Linux용 CIFS VFS module은 계층형 DFS 유사 namespace, hardlink, locking 등 여러 고급 network filesystem 기능을 지원합니다. 이 module은 1992년 X/Open SMB Standard를 대체한 SNIA CIFS Technical Reference를 준수하고, Windows 2000, Windows XP, Samba 및 이에 준하는 server와 실용적인 best-practice interoperability를 제공하도록 설계됐습니다.
이 code는 Protocol Freedom Information Foundation과 협력해 개발됐습니다. CIFS와 현재의 SMB3는 Mac, Windows 및 주요 NAS appliance 사이의 interoperability를 위한 사실상 표준이 됐습니다.
자세한 SMB2, SMB3, SMB3.1.1 protocol specification은 MS-SMB2를 참조하고, 관련 정보는 `https://samba.org/samba/PFIF/`에서 확인하십시오. 질문과 bug report는 `smfrench@gmail.com`으로 보내며, project page는 `https://wiki.samba.org/index.php/LinuxCIFS_utils`입니다.
Legacy dialect 호환성과 modern SMB3 interoperability를 한 client가 제공합니다.
Linux kernel build 절차
29-42Linux에서 CIFS VFS를 build하려면 다음 순서를 따릅니다. Command와 source tree 경로는 원문 표기를 유지합니다.
- 1) `https://www.kernel.org` 등에서 kernel을 내려받고 `/usr/src/linux-2.5.73` 같은 kernel directory tree 최상위로 이동합니다.
- 2) `make menuconfig` 또는 `make xconfig`를 실행합니다.
- 3) Network filesystem 선택지에서 `cifs`를 선택합니다.
- 4) 설정을 저장하고 종료합니다.
- 5) `make`를 실행합니다.
1) Download the kernel (e.g. from https://www.kernel.org)
and change directory into the top of the kernel directory tree
(e.g. /usr/src/linux-2.5.73)
2) make menuconfig (or make xconfig)
3) select cifs from within the network filesystem choices
4) save and exit
5) make
Kernel source 준비부터 cifs 선택과 compile까지의 순서입니다.
Module, built-in kernel과 mount helper 설치
43-73CIFS VFS를 module로 성공적으로 build했다면 `make modules_install`을 실행합니다. 수동 설치를 선호하면 생성된 file을 `/lib/modules/6.3.0-060300-generic/kernel/fs/smb/client/cifs.ko` 같은 modules directory로 복사할 수 있습니다.
CIFS VFS를 kernel 자체에 built-in했다면 distribution의 새 kernel 설치 지침을 따릅니다. 일반적으로 `make install`을 실행합니다.
Samba 4.x source tree와 CIFS VFS web site에서 제공하는 `mount.cifs` utility가 없다면 다른 mount helper가 있는 directory, 보통 `/sbin`에 복사합니다. Helper가 필수는 아니지만 `mount.cifs` 사용을 권장합니다. 대부분의 distribution은 이 utility를 포함한 `cifs-utils` package를 제공하므로 해당 package를 설치하는 것이 좋습니다.
모든 Linux client에서 Winbind pam/nss module인 logon service를 실행하면 domain 전체의 UID와 GID를 올바른 network user에 일관되게 mapping하는 데 유용합니다. `mount.cifs` mount helper는 `git.samba.org`의 `cifs-utils.git`에서 찾을 수 있습니다.
`cifs`를 module로 build하면 network buffer의 크기와 수, 한 server로 동시에 보낼 수 있는 최대 request 수를 구성할 수 있습니다. 기본값 변경은 권장하지 않습니다. 다음 명령으로 `kernel/fs/smb/client/cifs.ko`가 `insmod cifs.ko` 초기화 시 받을 수 있는 구성 parameter 목록을 확인할 수 있습니다.
modinfo <path to cifs.ko>
Build 형태에 따라 설치 명령과 결과 위치가 달라집니다.
안전한 dialect와 POSIX option 권장사항
74-87보안을 높이기 위해 SMB2.1 이상을 사용하며, 일반적으로 SMB3.1.1이 협상되는 것이 새로운 기본값입니다. Windows XP 같은 오래된 system을 mount하려면 `vers=1.0`을 사용하고, Windows Vista에는 `vers=2.0`을 사용할 수 있습니다.
CIFS인 `vers=1.0`은 기본 dialect인 SMB3보다 훨씬 오래됐고 보안성이 낮습니다. SMB3에는 downgrade attack 탐지, encrypted share, 더 강한 signing 및 authentication algorithm 같은 고급 security 기능이 포함됩니다.
SMB3에서 POSIX 동작을 개선하려면 `mfsymlinks`와 함께 `cifsacl` 또는 `modefromsid`를 사용하며, 일반적으로 `idsfromsid`도 같이 사용합니다. `vers=3`으로 SMB3 이상을 강제할 수 있지만 `vers=2.1`은 강제하지 않는다는 원문의 주의사항을 따릅니다.
호환성 목적의 legacy 설정과 권장 modern 설정을 구분합니다.
일반 사용자의 mount 허용
88-114CIFS VFS에서는 사용자가 소유한 directory 위에 share를 mount하고 unmount하도록 허용할 수 있습니다. 한 가지 방법은 `chmod +s /sbin/mount.cifs`처럼 `mount.cifs` utility에 suid를 설정하는 것입니다.
사용자가 자신이 mount한 share를 unmount하려면 `mount.cifs` version 1.4 이상이 필요하고, `/etc/fstab`에 사용자가 unmount할 수 있음을 나타내는 share entry가 있어야 합니다.
//server/usersharename /mnt/username cifs user 0 0
`mount.cifs`를 suid로 실행해 user mount를 허용할 때는 위험을 줄이기 위해 `nosuid` mount flag를 전달합니다. 따라서 remote target에 있는 suid program 실행을 막습니다. Root가 mount하면 기본적으로 `nosuid`를 전달하지 않으므로 remote target의 suid program 실행이 허용됩니다. NFS 등 다른 filesystem과 마찬가지로 mount option에 `nosuid`를 명시해 바꿀 수 있습니다.
User mount에서 반대로 `suid` flag를 전달할 수 있게 하려면 `CIFS_ALLOW_USR_SUID` flag를 사용해 `mount.cifs`를 다시 build해야 합니다. CIFS mount의 대응 manual page는 Samba 3.0 이상 source tree의 `docs/manpages/mount.cifs.8`에 있습니다.
Helper 권한, fstab policy와 자동 nosuid 적용의 관계입니다.
실행 주체와 build option에 따라 remote suid program 허용 여부가 달라집니다.
일반 사용자의 unmount 허용
115-135사용자가 자신이 user mount한 directory를 unmount하도록 하려면 `umount.cifs` utility를 사용할 수 있습니다. 직접 실행하거나 `/sbin`에 두면 대부분의 `umount` version이 CIFS mount를 해제할 때 이 helper를 호출합니다. 다만 `umount`에 `-i`를 지정하면 unmount helper를 호출하지 않습니다.
`mount.cifs`와 마찬가지로 user unmount를 허용하려면 `chmod +s /sbin/umount.cifs`처럼 `umount.cifs`에 suid 또는 동등한 권한을 부여해야 합니다. 일부 distribution에서는 `/etc/permissions` file에 entry를 추가해 같은 효과를 냅니다.
Utility가 성공하려면 target path가 CIFS mount여야 하고, 현재 user의 UID가 resource를 mount한 user의 UID와 일치해야 합니다.
일반적인 방법은 `mount.cifs`와 `unmount.cifs`를 suid로 사용하기보다 mount할 각 `//server/share`에 대해 `/etc/fstab`에 한 줄씩 추가하는 것입니다. 그러나 잠재적인 mount target이 많거나 UNC 이름을 예측하기 어려우면 관리하기 불편해질 수 있습니다.
Helper 호출과 ownership 검사를 모두 통과해야 합니다.
Samba Unix Extensions, xattr와 server 설정
136-167현재 server 대부분은 보안성이 더 높은 SMB2.1과 SMB3를 지원합니다. 그러나 오래되고 보안성이 낮은 CIFS dialect에도 유용한 protocol extension이 있으므로 CIFS/SMB1으로 mount하면서 최대 기능을 얻으려면 SNIA CIFS Unix Extensions 표준을 지원하는 server를 권장합니다. Samba 2.2.5 이상 대부분이 이에 해당하며, CIFS VFS 자체는 다양한 CIFS server와 동작합니다.
Samba 2.2.5 이상처럼 CIFS Unix extensions를 지원하는 server가 아니면 UID, GID와 file permission이 기본값으로 표시됩니다. Samba server의 `smb.conf`에 다음 설정을 추가해 Unix CIFS Extensions를 활성화합니다.
unix extensions = yes
Client 대부분이 Unix 또는 Linux라면 Samba server의 `smb.conf`에 다음 설정도 유용합니다.
case sensitive = yes
delete readonly = yes
ea support = yes
Linux CIFS client에서 xattr를 지원하려면 server의 EA support가 필요합니다. Samba 3.0.6 이상에는 EA support가 있고, Windows의 NTFS filesystem share에서도 EA가 동작합니다. Extended Attribute인 xattr는 대부분 Linux filesystem의 선택 기능이므로 `make menuconfig`에서 활성화해야 할 수 있습니다. Client의 user xattr 지원은 mount별로 `nouser_xattr`를 지정해 비활성화할 수 있습니다.
CIFS Unix Extensions와 Linux client의 metadata 동작에 필요한 항목입니다.
Server EA와 client filesystem 설정이 함께 준비돼야 합니다.
POSIX ACL, file mode와 symlink 동작
168-202CIFS client는 Samba 3.10 이상 server에서 `getfacl`과 `setfacl`로 POSIX ACL을 읽고 설정할 수 있습니다. POSIX ACL을 설정하려면 cifs module build 구성에서 먼저 XATTR를, 그다음 POSIX 지원을 활성화해야 합니다. Mount별로 `noacl`을 지정하면 POSIX ACL 지원을 끌 수 있습니다.
일부 관리자는 Samba `smb.conf`의 `map archive`와 `create mask` parameter 기본값을 바꾸고 싶을 수 있습니다. `create mask`를 바꾸지 않으면 새 file에 불필요하게 제한적인 default mode가 적용될 수 있습니다. Server와 client에 CIFS Unix extensions가 활성화돼 있으면 뒤이은 `setattr`, 예를 들어 `chmod` call로 mode를 수정할 수 있습니다.
Samba 3.0.6보다 오래된 version에서 remote `mknod`로 special device를 만들려면 Samba에 `mkdev` function을 지정해야 할 수 있습니다. 자세한 내용은 Samba server system에서 `man smb.conf`를 참조하십시오. `smbfs` VFS와 달리 CIFS VFS는 client system의 `smb.conf`를 읽지 않으며, 소수의 선택 설정은 mount 때 `-o` parameter로 전달합니다.
Samba 2.2.7 이상에는 엄격한 POSIX 준수에 필요한, CIFS VFS가 열린 file을 삭제할 수 있게 하는 수정이 포함돼 있습니다. Windows Server는 이미 이 기능을 지원했습니다.
Samba server는 share 밖의 file을 가리키는 symlink를 허용하지 않습니다. 따라서 Samba 3.0.6 이전에는 slash로 시작하는 absolute path의 file을 가리키는 다음과 같은 symlink 대부분이 금지됩니다.
ln -s /mnt/foo bar
Samba 3.0.6 이상은 share 밖의 server file을 가리키는 unsafe symlink를 server의 Samba 전용 형식으로 바꿔 안전하게 만들 수 있습니다. Local server application과 non-CIFS client는 이 형식을 무시하고 Samba server도 해당 symlink를 따라가지 않습니다. 이 처리는 CIFS VFS를 쓰는 Linux client application에는 보이지 않습니다.
Absolute symlink는 Samba 3.0.5 이상에서도 동작하지만 CIFS Unix extensions를 사용하는 remote client에서만 보이고, Windows client에는 보이지 않으며, 일반적으로 Samba와 같은 server에서 실행되는 local application에도 영향을 주지 않습니다.
원문에서 언급한 version 경계를 기능과 연결했습니다.
Share 밖을 가리키는 symlink가 server-side 안전 형식으로 바뀝니다.
Mount syntax와 credential 전달
203-251CIFS VFS support를 kernel에 built-in하거나 `cifs.ko` module로 설치한 뒤 다음 mount syntax로 Samba, Mac 또는 Windows server에 접근할 수 있습니다.
mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword
`-o` 앞에 `-v`를 지정하면 `mount.cifs` mount helper가 mount 단계를 더 자세히 표시합니다. `-o` 뒤에는 다음과 같이 자주 사용하는 CIFS VFS 전용 option을 지정합니다.
username=<username>
password=<password>
domain=<domain name>
다른 CIFS mount option은 뒤에서 설명합니다. `mount.cifs`가 설치돼 있으면 IP address뿐 아니라 TCP name도 사용할 수 있습니다. Mount한 server를 신뢰하지 않거나 CIFS signing이 꺼져 있고 physical network도 안전하지 않다면, hostile server나 router가 변경한 binary를 local system에서 실행할 위험을 줄이도록 표준 mount option `noexec`와 `nosuid` 사용을 검토하십시오.
`mount.cifs`는 아직 CIFS URL specification 형식으로 mount할 수 없지만, 널리 쓰는 UNC 형식 `\\server\share` 대신 NFS style과 비슷한 `server:share` 대체 형식을 사용할 수 있습니다.
mount -t cifs tcp_name_of_server:share_name /mnt -o user=myname,pass=mypasswd
`mount.cifs`를 사용할 때 command line의 일반 `pass=` syntax로 `-o` 뒤에 password를 직접 지정하는 대신 다른 방법을 사용할 수 있습니다.
- 1) Mount option에 `credentials=filename`을 넣고 credential file을 사용합니다. File에는 username과 password 두 줄이 들어갑니다.
- 2) `PASSWD` environment variable로 password를 지정합니다. 같은 방식으로 `USER` environment variable에서 user name을 가져올 수 있습니다.
- 3) `PASSWD_FILE`로 이름을 지정한 file에서 password를 읽습니다.
- 4) `PASSWD_FD`로 file descriptor를 지정해 password를 읽습니다.
username=someuser
password=your_password
Password를 제공하지 않으면 `mount.cifs`가 password 입력을 요청합니다.
Server 위치, session identity와 local security option을 분리해 확인합니다.
Command line 노출을 피할 수 있는 대체 credential source입니다.
Transport와 filename 제한
252-275Server는 `pure-TCP`, 즉 port 445의 TCP/IP CIFS connection 또는 RFC 1001/1002의 `Netbios-Over-TCP/IP` 중 하나를 지원해야 합니다. Server 대부분이 이를 지원하므로 일반적으로 문제가 되지 않습니다.
Windows와 Linux의 valid filename 규칙은 다릅니다. Windows는 stream name 시작을 구분하는 colon(`:`) 같은 예약 문자가 포함된 filename을 보통 제한하지만 Linux는 조금 더 넓은 문자 집합을 허용합니다. Windows server registry에 명시적 mapping을 설정하면 이러한 문자를 remap할 수 있습니다.
Samba 3.10부터는 server에 Unix Extensions를 구성하고 client가 `/proc/fs/cifs/LinuxExtensionsEnabled`를 비활성화하지 않았다면, Windows/CIFS semantics에서는 금지되지만 Linux에서는 valid한 문자를 포함하는 filename을 허용합니다.
CIFS `vers=1.0`에서는 mount option `mapposix`로 Windows, NTFS, SMB에서 금지된 문자를 remap 범위로 강제 mapping할 수 있습니다. SMB3에서는 이 mount parameter가 기본값입니다. `mapposix` remap 범위는 Mac과 일부 오래된 Windows의 `Services for Mac`과도 호환됩니다.
SMB 3.1.1 POSIX Extensions가 협상되면 remapping은 자동으로 비활성화됩니다.
Dialect와 extension 협상 결과에 따라 문자 mapping이 달라집니다.
Session identity, inode owner와 기본 mode
276-340다음은 지원하는 CIFS VFS mount option의 일부입니다. `username`은 CIFS session을 수립할 때 사용할 user name이고, `password`는 user password입니다. Mount helper가 설치돼 있고 password를 제공하지 않으면 입력을 요청합니다. `ip`는 target server의 IP address이며 `unc`는 mount할 target server의 Universal Network Name export입니다. `domain`은 CIFS session 수립 중 username 앞에 붙일 SMB/CIFS workgroup 이름을 설정합니다.
`forceuid`는 inode의 default UID를 mount 때 전달한 UID로 설정합니다. 올바르게 구성된 Samba처럼 CIFS Unix extensions를 지원하는 server는 UID, GID와 mode를 제공하므로 server와 client의 UID/GID numbering이 다른 경우가 아니면 이 parameter를 지정하지 않아야 합니다. Server와 client가 같은 domain에서 `winbind` 또는 `nss_ldap`을 실행하고 server가 Unix Extensions를 지원하면 UID와 GID를 server에서 가져올 수 있어 mount에 따로 지정할 필요가 없습니다.
Windows처럼 CIFS Unix extensions를 지원하지 않거나 UID/GID owner를 보고하지 않는 server에서는 `uid=` 또는 `gid=` option을 지정하지 않으면 기존 file lookup의 기본 UID/GID가 mount를 실행한 사람의 UID/GID가 됩니다. User mount용 `mount.cifs`가 setuid로 구성되지 않았다면 보통 root입니다. File 접근 authorization은 server에서 검사하지만 관리자가 client에서도 제한하고 싶을 수 있습니다. 이런 server에서는 `file_mode`와 `dir_mode`를 지정해 단순한 client-side permission 검사를 활성화할 수 있습니다.
`forcegid`는 UID 대신 group ID에 적용하는 `forceuid`와 같은 option입니다. `noforceuid`는 가능하면 server에 요청해 file owner UID를 채우며, server가 inode UID를 반환할 수 없을 때만 mount의 `uid=` 값을 사용합니다. `noforcegid`도 같은 방식으로 group owner GID에 적용됩니다.
`uid`는 inode의 default UID를 설정하고 어떤 local user가 mount했는지를 CIFS kernel driver에 알립니다. Server가 Unix extensions를 지원하면 `forceuid`를 지정하지 않는 한 이 default UID로 inode owner field를 채우지 않습니다. `gid`는 inode의 default GID를 같은 방식으로 설정합니다. Server가 CIFS Unix extensions를 지원하지 않으면 `file_mode`가 file inode의 default mode를 덮어씁니다.
Remote endpoint와 SMB session identity를 구성하는 기본 option입니다.
Unix Extensions 협상 여부와 force option이 inode metadata 출처를 결정합니다.
FS-Cache, transfer size와 attribute cache
341-392`fsc`는 기본적으로 꺼진 FS-Cache 기반 local disk caching을 활성화합니다. 느린 link, 부하가 큰 server 또는 network에서 server보다 disk read가 빠를 때 성능을 높이고 server call 수를 줄여 확장성을 개선할 수 있습니다. 그러나 read-once workload처럼 local caching이 맞지 않는 경우도 있으므로 workload와 scenario를 신중히 검토해야 합니다. 현재 local disk caching은 read-only로 연 CIFS file에서 동작합니다.
Server가 CIFS Unix extensions를 지원하지 않으면 `dir_mode`가 directory inode의 default mode를 덮어씁니다. `port`는 일반 port인 445, 이어서 139를 시도하기 전에 지정한 TCP port로 server에 접속하도록 합니다.
`iocharset`은 local path name을 Unicode로 변환하거나 Unicode에서 되돌릴 때 사용할 codepage입니다. Server가 지원하면 network path name에 기본적으로 Unicode를 사용합니다. `iocharset`을 지정하지 않으면 local client kernel build 때 정한 `nls_default`를 사용하며, server가 Unicode를 지원하지 않으면 이 parameter를 사용하지 않습니다.
`rsize`는 default read size이며 보통 16K입니다. Client는 `CIFSMaxBufSize`보다 큰 `rsize`를 쓸 수 없습니다. `CIFSMaxBufSize` 기본값은 16K이고 `cifs.ko` 설치 때 8K부터 kernel이 허용하는 최대 `kmalloc` size까지 바꿀 수 있습니다. 너무 큰 값은 memory 사용을 늘리고 경우에 따라 성능을 낮출 수 있습니다.
원래 CIFS protocol 최대값인 127K보다 큰 `rsize`를 사용하려면 server가 very large read용 새 Unix Capability flag도 지원해야 합니다. Samba 3.0.26 이상 같은 일부 새 server가 이를 지원합니다. `rsize` 범위는 최소 2048부터 최대 130048이며, 실제 최대값은 127K와 `CIFSMaxBufSize` 중 작은 값입니다.
`wsize`는 default write size로 57344입니다. 현재 CIFS가 허용하는 최대 `wsize`도 57344이며 이는 4096-byte page 14개입니다.
`actimeo=n`은 초 단위 attribute cache timeout이며 기본값은 1초입니다. Timeout 뒤 CIFS client가 server에 새 attribute 정보를 요청합니다. 짧은 timeout은 cache coherency를 높이지만 server call이 늘고, 긴 timeout은 call을 줄이는 대신 잠깐 잘못된 attribute cache가 남을 수 있어 coherency 검사가 느슨해집니다.
성능 향상과 coherency, memory 사용 사이의 tradeoff입니다.
Read/write mode, separator, 실행 policy와 helper option
393-445`rw`는 network share를 read-write로 mount하지만 server가 여전히 share를 read-only로 판단할 수 있습니다. `ro`는 read-only mount입니다. `version`은 mount helper utility의 서로 다른 version을 구분하는 데 쓰며 일반적으로 필요하지 않습니다.
`sep`을 `-o` 뒤의 첫 mount option으로 지정하면 mount parameter separator인 comma를 다른 문자로 바꿉니다. 일반 형식은 다음과 같습니다.
-o user=myname,password=mypassword,domain=mydom
Username, password 또는 domain에 comma가 포함됐을 때 period를 separator로 사용하려면 다음과 같이 전달할 수 있습니다.
-o sep=.user=myname.password=mypassword.domain=mydom
CIFS mount helper `cifs.mount` version 1.1 이상을 사용하면 `sep`의 중요성은 낮습니다.
`nosuid`는 remote executable의 suid bit 실행을 막습니다. CIFS Unix Extensions를 지원하는 Samba 같은 server mount에서만 의미가 있으며, network의 mount target을 신뢰하지 않는다면 보안을 위해 권장합니다. `exec`는 mount의 binary 실행을 허용하고 `noexec`는 금지합니다. `dev`는 remote mount의 block device를 인식하고 `nodev`는 인식하지 않습니다. `suid`는 mountpoint의 suid-enabled remote file 실행을 허용합니다. Root mount에서는 이것이 기본이고 user mount에서는 `nosuid`가 기본입니다.
`credentials`는 CIFS kernel component가 무시하지만 `mount.cifs` helper가 사용합니다. Helper는 지정한 credential file을 열어 user ID와 password argument를 읽고 CIFS VFS로 전달합니다. `guest`도 kernel component는 무시하지만, mount option에 지정하면 `mount.cifs`가 password를 묻지 않습니다. Password를 따로 지정하지 않으면 null password를 사용합니다.
Local VFS가 remote object를 어떻게 취급할지 지정합니다.
Kernel이 직접 해석하지 않는 option을 mount.cifs가 session argument로 바꿉니다.
Client permission, inode number와 create owner
446-506`perm`은 client에서 file UID/GID를 mode 및 원하는 operation과 비교하는 `vfs_permission` 검사를 수행합니다. Target machine의 server software가 수행하는 일반 ACL 검사에 추가되는 검사이며 기본적으로 활성화됩니다.
`noperm`은 client permission 검사를 끕니다. 이 때문에 local client system의 다른 user가 mount의 file에 접근할 수 있습니다. 보통 server가 CIFS Unix Extensions를 지원하지만 client와 server의 UID/GID가 충분히 일치하지 않아 mount user가 접근하지 못할 때만 필요합니다. CIFS Unix Extensions가 없는 mount에서도 mount에 default mode를 지정했지만 client에서 강제하고 싶지 않을 때, 예를 들어 `MultiUserMount`가 활성화된 경우 유용할 수 있습니다. 이 option은 mount 때 제공한 username에 대해 server ACL을 검사하는 정상 server-side ACL 검사에는 영향을 주지 않습니다.
`serverino`는 client에서 자동 증가 inode number를 만들지 않고 server의 inode number를 사용합니다. Hardlink file은 같은 inode number를 가지므로 찾기 쉽고 inode number가 지속될 수 있습니다. 그러나 한 share 아래 여러 server-side mount를 export하면 서로 다른 filesystem의 inode number가 겹칠 수 있어 server가 uniqueness를 보장하지 않습니다.
Windows 2000 이전 같은 일부 오래된 server는 UniqueID 또는 CIFS Unix Extensions의 동등 기능을 반환하지 않아 `serverino`가 효과가 없습니다. CIFS mount를 `nfsd` 아래 export하려면 CIFS mount에 이 option이 필요합니다. 현재는 server가 필요한 network operation을 지원할 때 `serverino`가 기본값입니다.
`noserverino`는 실제 server inode number 대신 client가 inode number를 생성합니다. 이 값은 unmount 또는 reboot 뒤 바뀌어 일부 application을 혼란스럽게 할 수 있지만 모든 server filesystem이 unique inode number를 지원하는 것은 아닙니다.
`setuids`는 server와 CIFS Unix extensions를 협상했을 때 새 file, directory, device를 `create`, `mkdir`, `mknod`하면서 local process의 effective UID와 GID를 설정하려고 합니다. Extensions를 협상하지 못하면 mount의 default UID/GID 대신 새 file의 UID/GID를 local cache에 저장하므로 inode reload 또는 share remount 때 file UID가 바뀔 수 있습니다.
`nosetuids`는 새 file, directory, device의 UID/GID를 client가 설정하지 않습니다. 이 경우 server가 default UID/GID, 보통 share를 mount한 user의 server UID를 설정하며 이것이 기본 동작입니다. CIFS Unix Extensions를 협상하지 못하면 새 file의 UID/GID는 mounter의 값 또는 mount의 `uid`와 `gid` parameter로 보입니다.
Client mode 검사와 server ACL 검사는 서로 독립적입니다.
Identity가 지속되는 위치와 기본 동작을 비교합니다.
NetBIOS, page cache, ACL, xattr와 character mapping
507-559`netbiosname`은 port 139로 server를 mount할 때 RFC1001 NetBIOS session 초기화에서 client NetBIOS machine name을 나타내는 RFC1001 source name을 지정합니다.
`direct`는 이 mount에서 연 file의 inode data caching을 하지 않으며 memory mapping도 사용할 수 없게 합니다. Fast network에서 client cache 이점이 거의 없거나, application이 같은 data를 다시 읽지 않고 page보다 큰 sequential read를 수행하는 경우에는 기본 page cache 동작보다 빠를 수 있습니다. 기본 동작은 oplock caching token을 받아 보유하면 local Linux client page cache를 통해 read-ahead와 write-behind를 수행합니다. `direct`는 page size보다 큰 write를 server에 보낼 수 있게 합니다.
`strictcache`는 strict cache mode를 켭니다. Client가 Oplock Level II를 가진 동안에는 항상 cache에서 읽고, 그렇지 않으면 server에서 읽습니다. 모든 write data는 cache에 저장하지만 Exclusive Oplock이 없으면 server에도 씁니다.
`rwpidforward`는 file을 연 process의 PID를 해당 file의 모든 read/write operation에 전달합니다. Mandatory `brlock` style을 사용할 때 WINE 같은 application의 read/write 실패를 막습니다.
`acl`은 server가 지원하면 `setfacl`과 `getfacl`로 POSIX ACL을 관리하도록 허용하며 기본값입니다. `noacl`은 이 mount에서 두 call을 허용하지 않습니다. `user_xattr`은 이름이 `user.` 또는 `os2.`로 시작하는 user xattr를 server의 OS/2 EA로 읽고 설정할 수 있게 하며 `setfattr`와 `getfattr`를 지원합니다. 이것도 기본값입니다. `nouser_xattr`는 `getfattr`와 `setfattr`의 xattr get/set/list를 허용하지 않습니다.
`mapchars`는 backslash를 제외한 7개 예약 문자 중 6개를 0xF000 위의 remap 범위로 변환합니다.
*?<>|:
이 mapping으로 CIFS client는 Windows POSIX emulation이 해당 문자를 사용해 만든 file을 인식할 수 있습니다. 이런 7개 문자가 포함된 이름의 생성과 open을 금지하는 대부분의 Samba version을 mount할 때도 유용합니다. Server가 wire에서 Unicode를 지원하지 않으면 효과가 없습니다. `nomapchars`는 이 7개 문자를 변환하지 않으며 기본값입니다.
Cache, ACL, xattr의 기본 동작을 정리했습니다.
Default, direct, strictcache mode에서 I/O source가 달라집니다.
Case, POSIX path, Unix Extensions, locking과 fsync
560-610`nocase`는 case-insensitive path name matching을 요청합니다. Server가 지원하면 case-sensitive가 기본입니다. Mount option `ignorecase`는 `nocase`와 같습니다.
`posixpaths`는 CIFS Unix extensions를 지원할 때 POSIX path name 지원 협상을 시도합니다. 일반 CIFS filename에서 금지되는 일부 문자를 remap 없이 사용할 수 있으며 기본값입니다. `noposixpaths`는 Unix extensions가 있어도 POSIX path name 지원을 요청하지 않으므로 server가 예약 문자가 포함된 file 생성을 거부할 수 있습니다.
`nounix`는 이 mount의 tree connection에서 CIFS Unix Extensions를 비활성화합니다. 드물게 필요하지만 POSIX ACL, POSIX lock, POSIX path, symlink, server의 UID/GID/mode 조회를 한 번에 끄거나 Unix Extensions를 잘못 구현한 server bug를 우회할 때 쓸 수 있습니다.
`nobrl`은 server에 byte-range lock request를 보내지 않습니다. CIFS style mandatory byte-range lock 때문에 깨지는 일부 application에 필요합니다. 대부분 CIFS server는 아직 advisory byte-range lock request를 지원하지 않습니다.
`forcemandatorylock`은 server가 POSIX advisory byte-range locking을 지원해도 mandatory lock request만 보냅니다. DOS/Windows용으로 작성돼 Windows style mandatory byte-range locking이 필요한 드문 application에 유용할 수 있습니다. 짧은 option 이름 `forcemand`도 허용합니다.
`nostrictsync`를 설정하면 application의 `fsync` call 때 CIFS client가 server의 모든 dirty data를 즉시 disk에 쓰게 하는 SMB Flush를 보내지 않습니다. 그래도 cached dirty file data는 모두 server에 보내고 write response를 기다립니다. SMB Flush가 매우 느리고 server가 충분히 신뢰할 만하다면 `fsync`를 지나치게 자주 호출하는 application의 성능을 높일 수 있지만 server crash 때 data risk가 조금 커집니다. 이 option을 설정하지 않으면 기본적으로 CIFS는 매 `fsync`마다 SMB Flush request를 보내고 response를 기다립니다.
Naming semantics와 byte-range lock policy를 구분합니다.
nostrictsync는 network write completion은 기다리지만 server disk flush는 생략합니다.
DFS, legacy compatibility, signing, encryption과 lease
611-666`nodfs`는 server가 지원한다고 해도 DFS global namespace 지원을 비활성화합니다. Samba 3.0.24와 3.0.25의 DFS path parsing 문제를 우회하는 데 도움이 될 수 있습니다. `remount`는 share를 다시 mount하며 흔히 `ro`와 `rw` 사이를 바꿀 때 사용합니다.
`cifsacl`은 file의 Windows ACL을 바탕으로 `stat` 등에 표시할 mode bit를 보고하는 experimental option입니다. `servern`은 server session 설정에 사용할 server NetBIOS name인 RFC1001 이름을 지정합니다. OS/2, Windows 98, Windows ME처럼 default server name을 지원하지 않는 오래된 server 일부를 mount할 때 필요합니다. Server name은 최대 15자이고 보통 uppercase입니다.
`sfu`는 CIFS Unix Extensions를 협상하지 못했을 때 Services for Unix와 호환되는 형식으로 device file과 FIFO 생성을 시도합니다. SFU처럼 `SETFILEBITS` extended attribute로 mode bit 10-12도 가져옵니다. 향후에는 security descriptor ACL query로 하위 9개 mode bit도 emulation할 예정이라고 원문은 설명합니다.
`mfsymlinks`는 Minshall+French symlink 지원을 활성화합니다. 참조 URL은 `http://wiki.samba.org/index.php/UNIX_Extensions#Minshall.2BFrench_symlinks`입니다. `sfu`와 함께 지정하면 이 option을 무시합니다. Server가 CIFS Unix Extensions를 지원해도 Minshall+French symlink를 사용합니다.
`sign`은 packet signing을 반드시 사용하게 해 route의 intermediate system이 원치 않게 data를 변경하는 것을 막는 데 도움을 줍니다. Signing은 `lanman` 또는 plaintext authentication과 함께 동작하지 않습니다.
`seal`은 이 mount share의 모든 data를 network로 보내기 전에 반드시 seal, 즉 encrypt합니다. Unix Extensions 지원이 필요합니다. `sign`과 달리 이 mount share의 data만 암호화하며 같은 server의 다른 mount share에는 영향을 주지 않습니다.
`locallease`는 드물게 필요한 experimental option입니다. Samba와 NFSv4 server 같은 application은 `fcntl F_SETLEASE`로 file cache 가능 여부를 확인합니다. CIFS는 명시적으로 lease를 요청할 수 없지만 file이 cache 가능한 oplock 상태인지 확인할 수 있습니다. Oplock이 없어도 server가 oplock을 지원하지 않고 update가 이 client에서만 일어난다고 확신하는 경우처럼, 다른 local process가 file을 쓰지 않으면 cache 가능할 수 있습니다. 이 option은 oplock이 없는 file에 lease를 거부하는 대신 CIFS client가 local process만 기준으로 lease를 검사하게 합니다.
Legacy server와 namespace, metadata compatibility를 위한 option입니다.
Integrity, confidentiality와 local cache 판단을 구분합니다.
Authentication mode, retry와 mount.cifs flag
667-707`sec`는 security mode를 지정합니다. 허용값은 다음과 같습니다.
Authentication mechanism과 packet signing 조합입니다.
`hard`는 server가 응답하지 않을 때 file operation을 재시도합니다. `soft`는 응답하지 않는 server에 대한 재시도를 보통 한 번으로 제한한 뒤 error를 반환하며 기본값입니다.
Application 대기와 빠른 error 반환 사이의 선택입니다.
`mount.cifs` mount helper는 `-o` 앞에 다음 option도 받습니다.
Source의 ASCII 표를 같은 의미의 구조화 table로 옮겼습니다.
대부분의 2.6 kernel용 `modutils`에서는 `modinfo`로 CIFS kernel module version을 표시할 수 있습니다.
/proc/fs/cifs informational pseudo-file
708-721`/proc/fs/cifs` 아래의 informational pseudo-file은 active session, share, open handle, 통계와 mount parameter를 관찰하는 read interface입니다.
Source의 ASCII 표를 각 pseudo-file의 관찰 범위로 구조화했습니다.
SecurityFlags, cifsFYI와 runtime configuration
722-788`SecurityFlags`는 security negotiation과 packet signing을 제어합니다. NTLMv2 같은 authentication의 `may` 또는 `must` flag를 signing flag와 조합할 수 있습니다. 반면 서로 다른 password hashing mechanism 두 개를 모두 `must use`로 지정하는 것은 의미가 거의 없습니다. 기본 flag 값은 다음과 같습니다.
0x00C5
기본값 `0x00C5`는 NTLMv2와 packet signing을 허용합니다. 일부 `SecurityFlags`는 대응하는 `menuconfig` option을 활성화해야 합니다.
Authentication, signing과 encryption의 may/must bit 조합입니다.
`cifsFYI`를 0이 아닌 값으로 설정하면 추가 debug 정보를 system error log에 기록합니다. 세 bit가 서로 다른 debug entry class를 제어하며 최대값 7은 모든 debug point를 켭니다. 기본값은 0입니다. 일부 debug statement는 kernel configuration에서 `CONFIG_CIFS_DEBUG2`를 활성화해야 CIFS kernel에 compile됩니다.
Source의 ASCII bitmask 표를 같은 의미의 구조화 table로 옮겼습니다.
`traceSMB`를 1로 설정하면 SMB request와 response 시작을 포함한 debug 정보를 system error log에 기록합니다. 기본값은 0입니다. `LookupCacheEnable`을 1로 설정하면 inode 정보를 1초 동안 cache해 lookup 성능을 개선하며 기본값은 1입니다.
`LinuxExtensionsEnabled`를 1로 설정하면 client가 선택적 protocol 개선인 CIFS `UNIX` extensions 사용을 시도합니다. 이 extension으로 CIFS server가 정확한 UID/GID를 반환하고 symbolic link도 지원할 수 있습니다. Samba처럼 지원 server를 사용하지만 symlink 지원을 쓰지 않고 실제 owner 대신 mount에서 제공한 UID/GID로 field를 mapping하려면 0으로 설정합니다. 기본값은 1입니다.
`dfscache`는 DFS cache 내용을 나열합니다. 0으로 설정하면 client가 cache를 비웁니다.
주요 runtime control과 기본값을 정리했습니다.
Runtime tracing과 share별 statistics
789-820CIFS module을 설치하거나 kernel에 built-in한 뒤, 예를 들어 `insmod cifs` 뒤에 `/proc/fs/cifs` flag를 바꿔 experimental feature와 tracing을 활성화할 수 있습니다. Feature를 켜려면 값을 1로 설정합니다. Kernel message log tracing의 모든 `cifsFYI` bit를 켜는 예는 다음과 같습니다.
echo 7 > /proc/fs/cifs/cifsFYI
`cifsFYI`는 bitmask입니다. 1은 여러 informational message의 추가 kernel logging, 2는 0이 아닌 SMB return code logging, 4는 byte-range lock request를 제외하고 완료에 1초 넘게 걸린 request logging을 활성화합니다. 4를 사용하려면 kernel `.config`에 `CONFIG_CIFS_STATS2`를 설정해야 합니다. 7은 세 기능을 모두 켭니다.
SMB request와 response 시작 trace는 다음과 같이 활성화합니다.
echo 1 > /proc/fs/cifs/traceSMB
Share별, 즉 client mount별 통계는 `/proc/fs/cifs/Stats`에서 확인합니다. Kernel `.config`에 `CONFIG_CIFS_STATS2`를 활성화하면 추가 정보가 제공됩니다. 통계에는 read, write, close 같은 request type별로 시도한 SMB3 또는 CIFS request 수와 server가 0이 아닌 return code를 보낸 실패 수가 포함됩니다.
해당 share에서 server로 읽고 쓴 총 byte도 기록합니다. Client caching 영향 때문에 이 값은 client application이 읽고 쓴 byte 수보다 적을 수 있습니다. 두 scenario의 성능을 비교할 때 유용하도록 `echo 0 > /proc/fs/cifs/Stats`로 통계를 0으로 reset할 수 있습니다.
`cat /proc/fs/cifs/DebugData`는 active session과 mount된 share 정보를 표시합니다.
Procfs bit를 바꾸면 kernel log와 statistics 관찰 범위가 확장됩니다.
Application I/O와 wire I/O는 client cache 때문에 다를 수 있습니다.
Kerberos, DFS와 cifs.upcall 구성
821-844Kerberos extended security는 동작하지만 `cifs.upcall` helper program version 1.2 이상이 설치돼 있고 `/etc/request-key.conf`에 구성돼 있어야 합니다. `cifs.upcall`은 Samba project(`https://www.samba.org`)에서 제공합니다. NTLM, NTLMv2, LANMAN 지원에는 이 helper가 필요하지 않습니다. Kerberos 대신 helper가 필요 없는 NTLMv2 security만으로 충분한 use case도 있습니다.
DFS는 MS-DFS namespace 안의 share로 transparent redirection을 허용합니다. IP address가 아니라 hostname으로 시작하는 UNC 이름의 target share를 지원하려면 `cifs.upcall` 같은 user space helper가 hostname을 IP address로 변환해야 하며, helper를 `/etc/request-key.conf`에도 구성해야 합니다. Samba, Windows server와 여러 NAS appliance는 network 구성을 단순화하고 reliability를 높이는 global namespace 구성 방법으로 DFS를 지원합니다.
CIFS Kerberos와 DFS를 사용하려면 Linux `keyutils` package를 설치하고 `/etc/request-key.conf`에 다음과 같은 줄을 추가합니다.
create cifs.spnego * * /usr/local/sbin/cifs.upcall %k
create dns_resolver * * /usr/local/sbin/cifs.upcall %k
Mechanism별 cifs.upcall dependency를 구분합니다.
Kernel key request가 user-space helper를 거쳐 target IP를 얻습니다.
CIFS kernel module parameter
845-864CIFS module parameter는 module load 때 지정하거나 runtime에 다음 interface를 사용해 수정할 수 있습니다.
/sys/module/cifs/parameters/<param>
Runtime에 값을 쓰는 예는 다음과 같습니다.
echo "value" > /sys/module/cifs/parameters/<param>
사용 가능한 module parameter와 값의 자세한 설명은 다음 명령으로 확인합니다.
modinfo cifs (or modinfo smb3)
`enable_oplocks`는 oplock을 활성화하거나 비활성화합니다. Oplock은 기본적으로 활성화돼 있습니다. `[Y/y/1]`로 활성화하고 `[N/n/0]` 중 하나로 비활성화합니다.
Load-time argument와 sysfs runtime write가 같은 parameter state를 제어합니다.
Oplock 기본값과 accepted boolean 값입니다.
Build, 설치와 기본 mount
usage.rst:1-275지원 SMB dialect와 server, kernel build·module 설치, 보안 권장사항, user mount/unmount, Samba Unix Extensions, credential 전달과 filename 제한을 정리합니다.