# Security_SetSharePermissions

> Sets the permissions on a Share for a Trustee.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/security-functions/security-setsharepermissions/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Sets the permissions on a Share for a Trustee.

sRight can be one of the following values:

- F: Full Control
- C: Change
- R: Read

### Syntax

Security_SetSharePermissions(sShare, sTrustee, sRight) As Boolean

### Parameters

#### sShare (String)

Name of the Share

#### sTrustee (String)

A trustee is a user or group. Trustee can either be "Domainname/username" or a [Well-known SID's](/capainstaller/vb-scripting-library/addendum/well-known-sid-s/) (Security Identifier) 

#### sRight (String)

Access Right that should be set

### Example

**VBScript**

```vb
If bStatus Then bStatus = Security_SetSharePermissions("\\Server01\CapaInstaller", "S-1-5-4", "F")
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Security functions](/capainstaller/vb-scripting-library/security-functions/) [Security_DenyShareAccess](/capainstaller/vb-scripting-library/security-functions/security-denyshareaccess/) [Security_RevokeSharePermissions](/capainstaller/vb-scripting-library/security-functions/security-revokesharepermissions/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
