# restrictToUser

<!-- https://uncage.vercel.app/docs/api/agent/functions/restricttouser/ -->

```ts
function restrictToUser(path, o?): Promise<void>;
```

Defined in: agent/src/perms.ts:36

Makes `path` readable by the current user only. POSIX: `chmod 600` (`700` for a directory).
Windows: `icacls "<path>" /inheritance:r /grant:r "<user>:F"` (`(OI)(CI)F` for a directory), which
drops the inherited entries (Users, Authenticated Users) and leaves only the user.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `path` | `string` |
| `o?` | [`PermsOptions`](https://uncage.vercel.app/docs/api/agent/interfaces/permsoptions.md) & `object` |

## Returns

`Promise`\<`void`\>
