Skip to main content

How to Set Permissions for AI Tools

Guide · about 7 min · refs checked 2026-11-03 (reference links and dates only)

How dangerous an AI tool is is mostly decided by the permissions you give it. This guide covers granting exactly enough and no more.

How to
Decide the job first, then the permissions: coding work gets the code directory, not your whole home directory. Grant read and write separately: if the task completes read-only, do not grant write. Mark off-limits zones: key files, account configs, and system directories are explicitly excluded. Turn on confirmation mode: deletions, overwrites, and outbound sends must ask before acting. Reclaim permissions regularly: when a project ends or the task changes, take back what you opened. Run experiments in restricted mode: try untrusted usage inside a sandbox first.

Example and interpretation

A teaching scenario, not a measured or executed site test.

For a filename-cleanup exercise, first grant read access to a test directory and request a rename list. Decide about writes afterwards. Listing proposed names does not require deletion, whole-disk or outbound-network access.

How to check your practice

Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.

For this topic, start with missing input · See all six scenarios and their reasoning

Sources
  • Why Filesystem requires declared dirs ↗
  • OpenHands Restricted Mode ↗
  • CLI permission prompts ↗