LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsindexFilesystemPermission
Interface●Since v1.9

FilesystemPermission

A single filesystem permission rule.

Rules are evaluated in declaration order; the first rule whose operations includes the requested operation AND whose paths glob-matches the target path determines the outcome. If no rule matches, access is allowed (permissive default).

All paths must be absolute glob patterns (start with /, no .. or ~). Supports ** (any depth), * (within one segment), and {a,b} brace expansion. Paths are validated when passed to createFilesystemMiddleware.

Copy
interface FilesystemPermission

Properties

property
mode: PermissionMode

Whether matching paths are permitted or blocked. Defaults to "allow".

property
operations: readonly FilesystemOperation[]

The operations this rule applies to.

property
paths: string[]

Absolute glob patterns for paths this rule matches. Must start with /; must not contain .. or ~. Supports ** (any depth), * (within one segment), and {a,b} brace expansion.

View source on GitHub