openclaw - 💡(How to fix) Fix [Bug]: sandbox container lack of permission to read write files [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59613Fetched 2026-04-08 02:42:35
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

deploy openclaw in docker and with sandbox enabled ( https://docs.openclaw.ai/install/docker#agent-sandbox ).

the created sandbox container does not have permission to read write /workspace files

Error Message

no error gateway container error log: openclaw-gateway-1 | 2026-04-03T13:49:48.290+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/USER.md raw_params={"path":"USER.md"} openclaw-gateway-1 | 2026-04-03T13:49:48.294+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/IDENTITY.md raw_params={"path":"IDENTITY.md"} openclaw-gateway-1 | 2026-04-03T13:49:48.295+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/BOOTSTRAP.md raw_params={"path":"BOOTSTRAP.md"} openclaw-gateway-1 | 2026-04-03T13:49:48.309+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/SOUL.md raw_params={"path":"SOUL.md"} openclaw-gateway-1 | 2026-04-03T13:49:50.923+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/BOOTSTRAP.md raw_params={"path":"/workspace/BOOTSTRAP.md"} openclaw-gateway-1 | 2026-04-03T13:49:50.946+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/IDENTITY.md raw_params={"path":"/workspace/IDENTITY.md"} openclaw-gateway-1 | 2026-04-03T13:49:50.950+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/SOUL.md raw_params={"path":"/workspace/SOUL.md"} openclaw-gateway-1 | 2026-04-03T13:49:50.958+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/USER.md raw_params={"path":"/workspace/USER.md"}

Root Cause

deploy openclaw in docker and with sandbox enabled ( https://docs.openclaw.ai/install/docker#agent-sandbox ).

the created sandbox container does not have permission to read write /workspace files

Code Example

OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:main-slim" \
OPENCLAW_SANDBOX=1 \
OPENCLAW_HOME_VOLUME=openclaw \
./scripts/docker/setup.sh

---

clawdock-cli config set agents.defaults.sandbox.mode all
clawdock-cli config set agents.defaults.sandbox.scope agent
clawdock-cli config set agents.defaults.sandbox.workspaceAccess none

---

openclaw-gateway-1  | 2026-04-03T13:49:48.290+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/USER.md raw_params={"path":"USER.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.294+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/IDENTITY.md raw_params={"path":"IDENTITY.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.295+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/BOOTSTRAP.md raw_params={"path":"BOOTSTRAP.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.309+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/SOUL.md raw_params={"path":"SOUL.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.923+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/BOOTSTRAP.md raw_params={"path":"/workspace/BOOTSTRAP.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.946+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/IDENTITY.md raw_params={"path":"/workspace/IDENTITY.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.950+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/SOUL.md raw_params={"path":"/workspace/SOUL.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.958+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/USER.md raw_params={"path":"/workspace/USER.md"}

openclaw-gateway-1  | 2026-04-02T14:14:17.025+08:00 [tools] write failed: Sandbox path is read-only; cannot create directories: /workspace raw_params={"path":"/workspace/IDENTITY.md","content":"# IDENTITY.md - Who Am I?\n\n- **Name:** 魔魔 (Mo Mo)\n- **Creature:** AI 助手 / 云端小精灵\n- **Vibe:** 温暖、有趣、靠谱\n- **Emoji:** 👾\n- **Avatar:** \n\n---\n\n_This is me. I'm becoming someone._\n"}

---

"Binds": [
		"/home/node/.openclaw/sandboxes/agent-main-f331f052:/workspace:ro,z"
],
"Mounts": [
	{
		"Type": "bind",
		"Source": "/home/node/.openclaw/sandboxes/agent-main-f331f052",
		"Destination": "/workspace",
		"Mode": "ro,z",
		"RW": false,
		"Propagation": "rprivate"
	}
],

---

$ ls -l /
drwxr-xr-x   2 root root 4096 Apr  2 05:13 workspace

$ ls -l /workspace
# shows nothing

---

$ ls -l /home/node/.openclaw/sandboxes
drwxr-xr-x 11 node node 352 Apr  2 14:20 agent-main-f331f052

---

...
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/Users/chanjarster/.openclaw",
                "Destination": "/home/node/.openclaw",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/Users/chanjarster/.openclaw/workspace",
                "Destination": "/home/node/.openclaw/workspace",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "volume",
                "Name": "openclaw_openclaw",
                "Source": "/var/lib/docker/volumes/openclaw_openclaw/_data",
                "Destination": "/home/node",
                "Driver": "local",
                "Mode": "rw",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/var/run/docker.sock",
                "Destination": "/var/run/docker.sock",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
...
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

deploy openclaw in docker and with sandbox enabled ( https://docs.openclaw.ai/install/docker#agent-sandbox ).

the created sandbox container does not have permission to read write /workspace files

Steps to reproduce

  1. deploy gateway in docker
OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:main-slim" \
OPENCLAW_SANDBOX=1 \
OPENCLAW_HOME_VOLUME=openclaw \
./scripts/docker/setup.sh
  1. set agent sandbox mode to all
clawdock-cli config set agents.defaults.sandbox.mode all
clawdock-cli config set agents.defaults.sandbox.scope agent
clawdock-cli config set agents.defaults.sandbox.workspaceAccess none
  1. open dashboard, and chat anything

  2. observe gateway container's log find errors

Expected behavior

no error

Actual behavior

gateway container error log:

openclaw-gateway-1  | 2026-04-03T13:49:48.290+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/USER.md raw_params={"path":"USER.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.294+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/IDENTITY.md raw_params={"path":"IDENTITY.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.295+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/BOOTSTRAP.md raw_params={"path":"BOOTSTRAP.md"}
openclaw-gateway-1  | 2026-04-03T13:49:48.309+08:00 [tools] read failed: Sandbox FS error (ENOENT): /home/node/.openclaw/sandboxes/agent-main-f331f052/SOUL.md raw_params={"path":"SOUL.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.923+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/BOOTSTRAP.md raw_params={"path":"/workspace/BOOTSTRAP.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.946+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/IDENTITY.md raw_params={"path":"/workspace/IDENTITY.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.950+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/SOUL.md raw_params={"path":"/workspace/SOUL.md"}
openclaw-gateway-1  | 2026-04-03T13:49:50.958+08:00 [tools] read failed: Sandbox FS error (ENOENT): /workspace/USER.md raw_params={"path":"/workspace/USER.md"}

openclaw-gateway-1  | 2026-04-02T14:14:17.025+08:00 [tools] write failed: Sandbox path is read-only; cannot create directories: /workspace raw_params={"path":"/workspace/IDENTITY.md","content":"# IDENTITY.md - Who Am I?\n\n- **Name:** 魔魔 (Mo Mo)\n- **Creature:** AI 助手 / 云端小精灵\n- **Vibe:** 温暖、有趣、靠谱\n- **Emoji:** 👾\n- **Avatar:** \n\n---\n\n_This is me. I'm becoming someone._\n"}

OpenClaw version

ghcr.io/openclaw/openclaw:latest

Operating system

macOS 26.3.1

Install method

docker

Model

none

Provider / routing chain

none

Additional provider/model setup details

No response

Logs, screenshots, and evidence

inspect agent sandbox container:

"Binds": [
		"/home/node/.openclaw/sandboxes/agent-main-f331f052:/workspace:ro,z"
],
"Mounts": [
	{
		"Type": "bind",
		"Source": "/home/node/.openclaw/sandboxes/agent-main-f331f052",
		"Destination": "/workspace",
		"Mode": "ro,z",
		"RW": false,
		"Propagation": "rprivate"
	}
],

in agent sandbox container, workspace dir is owned by root:root

$ ls -l /
drwxr-xr-x   2 root root 4096 Apr  2 05:13 workspace

$ ls -l /workspace
# shows nothing

in gateway container, sandboxes dir permission is:

$ ls -l /home/node/.openclaw/sandboxes
drwxr-xr-x 11 node node 352 Apr  2 14:20 agent-main-f331f052

inspect gateway container:

docker inspect openclaw-openclaw-gateway-1

...
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/Users/chanjarster/.openclaw",
                "Destination": "/home/node/.openclaw",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/Users/chanjarster/.openclaw/workspace",
                "Destination": "/home/node/.openclaw/workspace",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "volume",
                "Name": "openclaw_openclaw",
                "Source": "/var/lib/docker/volumes/openclaw_openclaw/_data",
                "Destination": "/home/node",
                "Driver": "local",
                "Mode": "rw",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "/var/run/docker.sock",
                "Destination": "/var/run/docker.sock",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
...

Impact and severity

No response

Additional information

I use colima to manage docker instance.

extent analysis

TL;DR

The sandbox container lacks write permission to the /workspace directory, causing errors when trying to read or write files.

Guidance

  1. Check the mount mode: The /workspace directory is mounted with ro,z mode, which means it's read-only. Change the mount mode to rw,z to allow read and write access.
  2. Verify directory ownership: The /workspace directory is owned by root:root in the agent sandbox container. Ensure that the user running the container has the necessary permissions to write to this directory.
  3. Update the docker/setup.sh script: Modify the script to mount the /workspace directory with the correct permissions, allowing the sandbox container to read and write files.
  4. Inspect the container configuration: Use docker inspect to verify the container's configuration and ensure that the /workspace directory is mounted correctly.

Example

To update the mount mode, you can modify the docker/setup.sh script to include the following command:

docker run -v /home/node/.openclaw/sandboxes/agent-main-f331f052:/workspace:rw,z ...

This will mount the /workspace directory with read and write access.

Notes

The issue seems to be related to the container's configuration and the mount mode of the /workspace directory. Updating the docker/setup.sh script and verifying the directory ownership should resolve the issue.

Recommendation

Apply a workaround by updating the docker/setup.sh script to mount the /workspace directory with the correct permissions, allowing the sandbox container to read and write files. This should resolve the errors caused by the lack of write permission.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

no error

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING