Skip to main content
REST API reference
A newer release of this product is available.

Update a CIFS share

PATCH /protocols/cifs/shares/{svm.uuid}/{name}

Introduced In: 9.6

Updates a CIFS share.

  • vserver cifs share modify

  • vserver cifs share properties add

  • vserver cifs share properties remove

Parameters

Name Type In Required Description

name

string

path

True

Share Name

svm.uuid

string

path

True

UUID of the SVM to which this object belongs.

Request Body

Name Type Description

access_based_enumeration

boolean

If enabled, all folders inside this share are visible to a user based on that individual user access right; prevents the display of folders or other shared resources that the user does not have access to.

change_notify

boolean

Specifies whether CIFS clients can request for change notifications for directories on this share.

comment

string

Specify the CIFS share descriptions.

encryption

boolean

Specifies that SMB encryption must be used when accessing this share. Clients that do not support encryption are not able to access this share.

oplocks

boolean

Specify whether opportunistic locks are enabled on this share. "Oplocks" allow clients to lock files and cache content locally, which can increase performance for file operations.

path

string

The fully-qualified pathname in the owning SVM namespace that is shared through this share. If this is a home directory share then the path should be dynamic by specifying the pattern %w (Windows user name), %u (UNIX user name), or %d (domain name) variables in any combination. ONTAP generates the path dynamically for the connected user and this path is appended to each search path to find the full Home Directory path.

  • example: /volume_1/eng_vol/

  • maxLength: 256

  • minLength: 1

  • Introduced in: 9.6

svm

svm

unix_symlink

string

Controls the access of UNIX symbolic links to CIFS clients. The supported values are:

  • local - Enables only local symbolic links which is within the same CIFS share.

  • widelink - Enables both local symlinks and widelinks.

  • disable - Disables local symlinks and widelinks.

volume

volume

Example request
{
  "comment": "HR Department Share",
  "home_directory": null,
  "path": "/volume_1/eng_vol/",
  "svm": {
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "unix_symlink": "string",
  "volume": {
    "name": "volume1",
    "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
  }
}

Response

Status: 200, Ok

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

655628

'SMB_ENCRYPTION' property cannot be set on CIFS share because the CIFS server does not support SMB3.0

655551

CIFS Share modification failed because the specified path does not exist

655620

Cannot set symlink properties for admin shares

656420

Cannot modify the standard share ipc$

656421

Cannot modify the standard share admin$

656422

Failed to modify the home directory share because the directory shares must specify a path relative to one or more home directory search paths

656423

Failed to modify CIFS share. The Shares must define an absolute share path

656425

Failed to modify the CIFS share because the path for an administrative share cannot be modified

Definitions

See Definitions

href

Name Type Description

href

string

cifs_share_acl

The permissions that users and groups have on a CIFS share.

Name Type Description

permission

string

Specifies the access rights that a user or group has on the defined CIFS Share. The following values are allowed:

  • no_access - User does not have CIFS share access

  • read - User has only read access

  • change - User has change access

  • full_control - User has full_control access

svm

Name Type Description

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

Name Type Description

name

string

The name of the volume.

uuid

string

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

cifs_share

CIFS share is a named access point in a volume. Before users and applications can access data on the CIFS server over SMB, a CIFS share must be created with sufficient share permission. CIFS shares are tied to the CIFS server on the SVM. When a CIFS share is created, ONTAP creates a default ACL for the share with Full Control permissions for Everyone.

Name Type Description

access_based_enumeration

boolean

If enabled, all folders inside this share are visible to a user based on that individual user access right; prevents the display of folders or other shared resources that the user does not have access to.

change_notify

boolean

Specifies whether CIFS clients can request for change notifications for directories on this share.

comment

string

Specify the CIFS share descriptions.

encryption

boolean

Specifies that SMB encryption must be used when accessing this share. Clients that do not support encryption are not able to access this share.

oplocks

boolean

Specify whether opportunistic locks are enabled on this share. "Oplocks" allow clients to lock files and cache content locally, which can increase performance for file operations.

path

string

The fully-qualified pathname in the owning SVM namespace that is shared through this share. If this is a home directory share then the path should be dynamic by specifying the pattern %w (Windows user name), %u (UNIX user name), or %d (domain name) variables in any combination. ONTAP generates the path dynamically for the connected user and this path is appended to each search path to find the full Home Directory path.

  • example: /volume_1/eng_vol/

  • maxLength: 256

  • minLength: 1

  • Introduced in: 9.6

svm

svm

unix_symlink

string

Controls the access of UNIX symbolic links to CIFS clients. The supported values are:

  • local - Enables only local symbolic links which is within the same CIFS share.

  • widelink - Enables both local symlinks and widelinks.

  • disable - Disables local symlinks and widelinks.

volume

volume

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.