ONTAP 9.15.1 commands

vserver cifs share modify

Modify a CIFS share

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The vserver cifs share modify command modifies a CIFS share.

Parameters

-vserver <vserver name> - Vserver

This parameter specifies the CIFS-enabled Vserver containing the CIFS share you want to modify.

-share-name <Share> - Share

This parameter specifies the name of the CIFS share that you want to create. A share name can be up to 80 characters long. If this is a home directory share (designated as such by specifying the homedirectory on the -share-properties parameter), you can include %w (Windows user name), %u (UNIX user name) and %d (Windows domain name) variables in any combination with this parameter to generate shares dynamically, with the resultant share names based on the authenticating user.s Windows user name, UNIX user name, and/or Windows domain name.

[-path <text>] - Path

This parameter specifies the path to the CIFS share. This path must exist in a volume. A directory path name can be up to 256 characters long. If there is a space in the path name, you must enclose the entire string in quotation marks (for example, "/new volume/mount here"). If this is a homedirectory share as specified by value of home directory on the -share-properties parameter, a dynamic path name must be specified using %w (Windows user name), %u (UNIX user name), or %d (domain name) variables or any of their combination as a part of the value of this parameter. If this is a continuously-available share as specified by value of continuously-available on the -share-properties parameter, the path must not be within a FlexGroup because this property is not supported for FlexGroups.

[-symlink-properties {enable|hide|read-only|symlinks|symlinks-and-widelinks|disable|no-strict-security}] - Symlink Properties

This optional parameter specifies how the storage system presents UNIX symbolic links (symlinks) to CIFS clients. The list can include one or more of the following:

  • enable (DEPRECATED*) - This property enables both local symlinks and wide links for read-write access. DFS advertisements are generated for both local symlinks and wide links even if the CIFS option -is-advertise-dfs-enabled is set to false.

  • hide (DEPRECATED*) - This property hides symlinks. DFS advertisements are generated if the CIFS option -is-advertise-dfs-enabled is set to true.

  • read-only (DEPRECATED*) - This property enables symlinks for read-only access.

  • symlinks - This property enables local symlinks for read-write access. DFS advertisements are not generated even if the CIFS option -is-advertise-dfs-enabled is set to true.

  • symlinks-and-widelinks – This property enables both local symlinks and wide links for read-write access. DFS advertisements are generated for both local symlinks and wide links even if the CIFS option -is-advertise-dfs-enabled is set to false.

  • disable - This property disables symlinks and wide links. DFS advertisements are not generated even if the CIFS option -is-advertise-dfs-enabled is set to true.

  • no-strict-security - This property enables clients to follow symlinks outside share boundaries.

The read_only setting does not apply to wide links.
* The enable , hide , and read-only parameters are deprecated and may be removed in a future release of Data ONTAP.
The no_strict_security setting does not apply to wide links.
[-file-umask <Octal Integer>] - File Mode Creation Mask

This optional parameter specifies the default UNIX umask for new files created on the share.

[-dir-umask <Octal Integer>] - Directory Mode Creation Mask

This optional parameter specifies the default UNIX umask for new directories created on the share.

[-comment <text>] - Share Comment

This optional parameter specifies a text comment for the share that is made available to Windows clients. The comment can be up to 256 characters long. If there is a space in the descriptive remark or the path, you must enclose the entire string in quotation marks (for example, "This is engineering’s share.").

[-attribute-cache-ttl <[<integer>d][<integer>h][<integer>m][<integer>s]>] - File Attribute Cache Lifetime

This optional parameter specifies the lifetime for the attribute cache share property, which you specify as the value of the -share-properties parameter.

This value is useful only if you specify attributecache as a share property.
[-offline-files {none|manual|documents|programs}] - Offline Files

This optional parameter allows Windows clients to cache data on this share.The actual caching behavior depends upon the Windows client. The value can be one of the following:

  • none - Disallows Windows clients from caching any files on this share.

  • manual - Allows users on Windows clients to manually select files to be cached.

  • documents - Allows Windows clients to cache user documents that are used by the user for offline access.

  • programs - Allows Windows clients to cache programs that are used by the user for offline access and may use those files in an offline mode even if the share is available.

[-vscan-fileop-profile {no-scan|standard|strict|writes-only}] - Vscan File-Operations Profile

This optional parameter controls which operations trigger virus scans. The value can be one of the following:

  • no-scan: Virus scans are never triggered for this share.

  • standard: Virus scans can be triggered by open, close, and rename operations. This is the default profile.

  • strict: Virus scans can be triggered by open, read, close, and rename operations.

  • writes-only: Virus scans can be triggered only when a file that has been modified is closed.

[-max-connections-per-share <integer>] - Maximum Tree Connections on Share

This optional parameter specifies a maximum number of simultaneous connections to the share. This limit is at the node level, not the Vserver or cluster level. The default for this parameter is 4294967295. The value 4294967295 indicates no limit. The allowed range for this parameter is (1 through 4294967295).

[-force-group-for-create <text>] - UNIX Group for File Create

This optional parameter specifies that all files that CIFS users create in a specific share belong to the same group (also called the "force-group"). The "force-group" must be a predefined group in the UNIX group database. This setting has no effect unless the security style of the volume is UNIX or mixed security style. You can disable this option by passing a null string "".

Examples

The following example modifies a CIFS share named SALES_SHARE on a Vserver named vs1. The share uses opportunistic locks. The file mask is set to 644 and the directory mask to 777.

cluster1::> vserver cifs share modify -vserver vs1 -share-name SALES_SHARE -symlink-properties hide -file-umask 644 -dir-umask 777

The following example modifies a CIFS share named DOCUMENTS on a Vserver named vs1. This triggers a virus scan on write-only files in the share.

cluster1::> vserver cifs share modify -vserver vs1 -share-name DOCUMENTS -vscan-fileop-profile writes-only

The following example modifies a CIFS share named DOCUMENTS on a Vserver vs1. The share allows client to cache (client-side caching) user documents on this share.

cluster1::> vserver cifs share modify -vserver vs1 -share-name DOCUMENTS -offline-files documents

The following example modifies a CIFS share named DOCUMENTS on a Vserver named vs1. The optional parameter "force-group-for-create" can be disabled by passing the null string as parameter to "force-group-for-create" option.

cluster1::> cifs share modify -vserver vs1 -share-name DOCUMENTS -force-group-for-create ""

The following example modifies the symlink property of all the shares on all the Vserver to "enable".

cluster1::> vserver cifs share modify -vserver * -share-name * -symlink-properties enable
Top of Page