Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP Cluster-mode documentation.

Cmdlet: Set-NaCifsShareAcl


NAME
Set-NaCifsShareAcl

SYNOPSIS
Sets the access control list entry for the given CIFS share.

SYNTAX
Set-NaCifsShareAcl [-Share] <String> [-User] <String> [-AccessRights] <Strin
g> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-NaCifsShareAcl [-Share] <String> -Acl <CifsShareAclInfo> [-Controller <N
aController>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-NaCifsShareAcl [-Share] <String> [-UnixGroup] <String> [-AccessRights] <
String> [-Controller <NaController>] [-WhatIf] [-Confirm] [<CommonParameters
>]


DESCRIPTION
Sets the access control list entry for the given CIFS share for a specific u
ser, group, or unix group. This API is equivalent to "cifs access <share> [
-g] <user|group> <rights>" CLI.


PARAMETERS
-Share <String>
CIFS share name. It specifies name of the share for which the access ri
ghts have to be set. This is a case insensitive field. The maximum siz
e of the share name is 256 characters.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-User <String>
Name of the user. This API sets the access rights for the specified use
r. This is a case sensitive field. If the specified user does not exis
t, this API fails with the reason "Unknown user: <username>".

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-AccessRights <String>
Access rights to be set to the above share and user. The format of the
rights can be Unix-style combinations of r, w, x; or NT-style "No Access
", "Read", "Change", and "Full Control".

Required? true
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Acl <CifsShareAclInfo>
An ACL object as returned by Get-NaCifsShareAcl. This parameter set sim
plifies copying ACLs among CIFS shares.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-UnixGroup <String>
Name of the unix group. This field specifies the unix group for which t
he access rights are to be set. This is a case sensitive field. If the
specified group name does not exist, this API fails with the reason "Un
known Unix group : <groupname>".

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.Types.Cifs.CifsShareInfo


NOTES


Category: cifs
API: cifs-share-ace-set

-------------- Example 1 --------------

C:\PS>Set-NaCifsShareAcl HOME root -AccessRights rw | Get-NaCifsShareAcl


Add read/write rights to the CIFS share 'HOME' for the root user.


ShareName UserAclInfo
--------- -----------
HOME {everyone, root}


-------------- Example 2 --------------

C:\PS>Get-NaCifsShareAcl share1 | Set-NaCifsShareAcl share2 | ft -AutoSize


Copy all ACL entries from CIFS share 'share1' to CIFS share 'share2'.


MountPoint ShareName Description
---------- --------- -----------
/vol/vol2 share2



RELATED LINKS
Get-NaCifsShare
Get-NaCifsShareAcl
Remove-NaCifsShareAcl







 Data ONTAP® PowerShell Toolkit