---
title: "Set a file's permissions, e.g. 755 to make it runnable."
method: POST
path: "/v1/sandboxes/{id}/files:chmod"
tags: ["files"]
---

# Set a file's permissions, e.g. 755 to make it runnable.

`POST /v1/sandboxes/{id}/files:chmod`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/files:chmod`
- Auth: HTTP bearer

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `path` string, required: Absolute path in the sandbox, e.g. /workspace/app/main.py. Any path the sandbox user may use.
  - `mode` string, required: Octal permissions for the file, e.g. 755 for a program. Default 644. No set-id or sticky bits.

## Response `200`

Success

- object
  - `path` string, required
  - `mode` string, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
