Fix: EACCES permission denied โ openclaw.json
File Ownership Mismatch
The gateway cannot write its config file because the process user doesn't own ~/.openclaw/. Most common in Docker when a volume is mounted with root ownership.
OpenClaw writes config atomically via a .tmp file. If it can't create that temp file, you'll see EACCES: permission denied. The gateway exits without saving any state changes.
Next Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Jump to Fix
The Error
The UUID in the filename (.7.2ede223b-...) is a random temp suffix. The important part is that OpenClaw is trying and failing to write to ~/.openclaw/.
Fix A: Fix Ownership on Host (Docker โ Most Common)
If you're running OpenClaw in Docker with a bind mount, the host directory is often owned by root. The container process runs as UID 1000 (the node user), which can't write to a root-owned directory.
On the host machine, run:
sudo chown -R 1000:1000 ~/.openclaw
Or if your openclaw data directory is elsewhere:
sudo chown -R 1000:1000 /path/to/your/openclaw-data
UID 1000 is the default for the node user in the official OpenClaw Docker image. If you built a custom image with a different UID, replace 1000:1000 with your container's user and group IDs.
Fix B: Set User in Docker Compose
A cleaner long-term fix is to tell Docker Compose to run the container as the correct user. This way ownership doesn't matter as long as the UID matches:
services:
openclaw:
image: openclaw/openclaw:latest
user: "1000:1000"
volumes:
- ~/.openclaw:/home/node/.openclawThen recreate the container:
docker compose down && docker compose up -d
Fix C: Bare Linux (Without Docker)
If you're running OpenClaw directly on Linux (not in Docker), the issue is usually that the config directory was created by a different user โ often root during a sudo install.
ls -la ~/.openclaw/
If it shows root root ownership, fix it:
sudo chown -R $USER:$USER ~/.openclaw
Verify the Fix
ls -la ~/.openclaw/ shows your user as owner
Not root, not node โ should match the user running openclaw
Gateway starts without permission errors
Check logs: openclaw logs --follow | grep -i "permission\|EACCES"
Config saves after changes
Make a small change in the Web UI or via CLI and confirm it persists after restart
Still Broken?
Check what user the gateway process is actually running as:
# Find the PID ps aux | grep openclaw # Check the UID of that process ls -la /proc/<PID>/exe
Run the Doctor
Checks file permissions, directory ownership, and config write access automatically.
Related Issues
Other config and startup errors:
Fix It Faster With Our Tools
Did this guide solve your problem?