# Set File Permissions

> Set permissions on a file.

Source: https://docs.capaone.com/capaone/application-manager/powerbricks/set-file-permissions/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

Set permissions on a file

## Parameters

#### File path
*Required*

The full path of the file - ex. C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe

#### User or group
*Required*

The user or group to add permissions for - ex. Domain\User or $env:COMPUTERNAME\LocalGroupName or S-1-5-32-544 or BUILTIN\Users. Please add only one user or group.

#### Permission
*Required* — Default: `Full Control`

The permission to add Allowed values: `Delete`, `Execute File`, `Full Control`, `Modify`, `Read`, `Read And Execute`, `Write`.

#### Require File To Exist
*Optional* — Default: `True`

Enable to stop with an error when the file does not exist. Disable only if the file is expected to be missing on some machines.

## Details

- **Category:** Permissions
- **Brick ID:** `File-Add-Permission`

## Raw JSON definition

**JSON**

```json
{
  "category": "permissions",
  "description": "Set permissions on a file",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "File-Add-Permission",
  "name": "Set File Permissions",
  "parameters": [
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The full path of the file - ex. C:\\Program Files\\Common Files\\Microsoft Shared\\ink\\TabTip.exe",
      "id": "Path",
      "name": "File path",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The user or group to add permissions for - ex. Domain\\User or $env:COMPUTERNAME\\LocalGroupName or S-1-5-32-544 or BUILTIN\\Users. Please add only one user or group.",
      "id": "Identity",
      "name": "User or group",
      "regExValidation": "",
      "required": true,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": {
        "id": "FullControl",
        "name": "Full Control"
      },
      "description": "The permission to add",
      "id": "Right",
      "name": "Permission",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "Delete",
          "name": "Delete"
        },
        {
          "id": "ExecuteFile",
          "name": "Execute File"
        },
        {
          "id": "FullControl",
          "name": "Full Control"
        },
        {
          "id": "Modify",
          "name": "Modify"
        },
        {
          "id": "Read",
          "name": "Read"
        },
        {
          "id": "ReadAndExecute",
          "name": "Read And Execute"
        },
        {
          "id": "Write",
          "name": "Write"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "True",
      "defaultValueObject": null,
      "description": "Enable to stop with an error when the file does not exist. Disable only if the file is expected to be missing on some machines.",
      "id": "ShouldPathExist",
      "name": "Require File To Exist",
      "regExValidation": "",
      "required": false,
      "type": "Boolean",
      "value": null,
      "values": [],
      "valuesObject": null
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.9.1.1"
}
```
