---
title: "Fix Filesystem MCP: Permission Denied / Outside Root Sandbox (EACCES)"
slug: "filesystem-permission-denied-eacces"
code: "EACCES"
category: "Security & Sandbox"
severity: "High"
canonical: "https://mcp-codex.com/errors/filesystem-permission-denied-eacces"
source: "MCP Codex (https://mcp-codex.com)"
dateModified: "2026-09-28"
---

# Fix Filesystem MCP: Permission Denied / Outside Root Sandbox (EACCES)

**Category**: Security & Sandbox | **Severity**: High

## Symptom
Filesystem server returns error: Access denied to path outside allowed directory boundaries.

## Root Cause
The tool attempted to read or write a file outside the directories specified in the server arguments list.

## Remediation & Quick Fix
Add the directory or parent directory to the args array in your client configuration.

## OS Remediation Commands

### MAC
```bash
# Check directory permissions:
ls -la /path/to/target
```

### WINDOWS
```bash
# Check directory permissions:
Get-Acl -Path C:\path\to\target
```

### LINUX
```bash
# Check directory permissions:
ls -la /path/to/target
```

## Correct Configuration Example
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:/Projects/main-app",
        "C:/Projects/shared-libs"
      ]
    }
  }
}
```

## Canonical Diagnostic Link
https://mcp-codex.com/errors/filesystem-permission-denied-eacces

## Weekly Protocol & Patch Diffs
Subscribe to verified runtime fixes and schema changes: https://mcp-codex.com#newsletter
