Add or remove share properties on existing ONTAP SMB shares
You can customize an existing SMB share by adding or removing share properties.
The available share properties are as follows:
| Share properties | Description |
|---|---|
|
This property specifies that the share uses opportunistic locks, also known as client-side caching. |
|
This property allows Windows clients to browse the share. |
|
This property specifies that snapshots can be viewed and traversed by clients. |
|
This property specifies that the share supports Change Notify requests. For shares on an SVM, this is a default initial property. |
|
This property enables the file attribute caching on the SMB share to provide faster access of attributes. The default is to disable attribute caching. This property should be enabled only if there are clients connecting to shares over SMB 1.0. This share property is not applicable if clients are connecting to shares over SMB 2.x or SMB 3.0. |
|
This property permits SMB clients that support it to open files in a persistent manner. Files opened this way are protected from disruptive events, such as failover and giveback. |
|
This property specifies that the share allows clients to request BranchCache hashes on the files within this share. This option is useful only if you specify “per-share” as the operating mode in the CIFS BranchCache configuration. |
|
This property specifies that Access Based Enumeration (ABE) is enabled on this share. ABE-filtered shared folders are visible to a user based on that individual user's access rights, preventing the display of folders or other shared resources that the user does not have rights to access. |
|
This property specifies that the SMB clients connecting to this share can cache the directory enumeration results returned by the CIFS servers, which can provide better performance. By default, SMB 1 clients do not cache directory enumeration results. Because SMB 2 and SMB 3 clients cache directory enumeration results by default, specifying this share property provides performance benefits only to SMB 1 client connections. |
|
This property specifies that SMB encryption must be used when accessing this share. SMB clients that do not support encryption when accessing SMB data will not be able to access this share. |
Add share properties on existing ONTAP SMB shares
You can customize an existing SMB share by adding share properties. This can be useful if you want to change the share configuration to meet changing requirements in your environment.
The share whose properties you want to modify must exist.
-
You can add one or more share properties by using a comma-delimited list.
-
Any share properties that you have previously specified remain in effect.
Newly added properties are appended to the existing list of share properties.
-
If you specify a new value for share properties that are already applied to the share, the newly specified value replaces the original value.
-
You cannot remove share properties by using the
vserver cifs share properties addcommand.You can use the
vserver cifs share properties removecommand to remove share properties.
-
Add share properties:
vserver cifs share properties add -vserver <SVM_name> -share-name <share_name> -share-properties <properties>,... -
Verify the share property settings:
vserver cifs share show -vserver vserver_name -share-name share_name
The following command adds the showsnapshot share property to a share named “share1” on SVM vs1:
cluster1::> vserver cifs share properties add -vserver vs1 -share-name share1 -share-properties showsnapshot
cluster1::> vserver cifs share show -vserver vs1
Vserver Share Path Properties Comment ACL
--------- ------ -------- ---------- -------- -----------
vs1 share1 /share1 oplocks - Everyone / Full Control
browsable
changenotify
showsnapshot
Remove share properties on existing ONTAP SMB shares
You can customize an existing SMB share by removing share properties. This can be useful if you want to change the share configuration to meet changing requirements in your environment.
-
You can remove one or more share properties by using a comma-delimited list.
-
Any share properties that you have previously specified but do not remove remain in effect.
-
Remove share properties:
vserver cifs share properties remove -vserver <SVM_name> -share-name <share_name> -share-properties <properties>,... -
Verify the share property settings:
vserver cifs share show -vserver <SVM_name> -share-name <share_name>
The following command removes the browsable share property from a share named “share2” on SVM vs1:
cluster1::> vserver cifs share properties remove -vserver vs1 -share-name share2 -share-properties browsable
cluster1::> vserver cifs share show -vserver vs1
Vserver Share Path Properties Comment ACL
--------- ------ -------- ---------- -------- -----------
vs1 share2 /share2 oplocks - Everyone / Full Control
changenotify