ONTAP 9 Manuals ( CA08871-402 )

Add or remove share properties on an existing SMB share

You can customize an existing SMB share by adding or removing share properties. This can be useful if you want to change the share configuration to meet changing requirements in your environment.

Before you begin

The share whose properties you want to modify must exist.

About this task

Guidelines for adding share properties:

  • 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 add command.

    You can use the vserver cifs share properties remove command to remove share properties.

Guidelines for removing share properties:

  • 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.

Steps
  1. Enter the appropriate command:

    If you want to…​ Enter the command…​

    Add share properties

    vserver cifs share properties add -vserver _vserver_name_ -share-name _share_name_ -share-properties _properties_,...

    Remove share properties

    vserver cifs share properties remove -vserver _vserver_name_ -share-name _share_name_ -share-properties _properties_,...

  2. Verify the share property settings: vserver cifs share show -vserver vserver_name -share-name share_name

Examples

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

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
Related information

Commands for managing SMB shares

Top of Page