> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gravixlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Permissions

> Set Unix file mode (chmod) on a path in an agent runtime

Sets permission bits using a chmod-style **octal string** (for example `"644"` or `"0755"`).

```python theme={null}
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

# Create the file first so we have something to chmod
runtime.file.write("/workspace/file.txt", "hello\n")

runtime.file.set_permissions("/workspace/file.txt", "644")

runtime.kill()
```

## Parameters

| Parameter | Type   | Required | Description                               |
| --------- | ------ | -------- | ----------------------------------------- |
| `path`    | string | Yes      | File or directory path                    |
| `mode`    | string | Yes      | Octal mode string, e.g. `"644"`, `"0755"` |

## Response (`SetPermissionsResponse`)

| Field     | Type    | Description                     |
| --------- | ------- | ------------------------------- |
| `message` | string  | Confirmation message            |
| `success` | boolean | Whether the operation succeeded |
