Discord bot token set - Error: EACCES: permission denied, copyfile '/sandbox/.openclaw/openclaw.json
Description
Error: EACCES: permission denied, copyfile '/sandbox/.openclaw/openclaw.json.3911.e5b68777-7135-4594-9ec1-0dfd400a4117.tmp' -> '/sandbox/.openclaw/openclaw.json'
Reproduction Steps
get inside the sandbox and then run openclaw onboard and then you can setup the bot token for discord and once you set the channels and discord allowfrom
Error: EACCES: permission denied, copyfile '/sandbox/.openclaw/openclaw.json.3911.e5b68777-7135-4594-9ec1-0dfd400a4117.tmp' -> '/sandbox/.openclaw/openclaw.json'
Environment
Ubuntu Server 24.04 LTS
Debug Output
◇ Configure Discord channels access?
│ Yes
│
◇ Discord channels access
│ Open (allow all channels)
│
◇ Selected channels ────────────────────────────────────────────╮
│ │
│ Discord — very well supported right now. Docs: │
│ discord │
│ │
├────────────────────────────────────────────────────────────────╯
Error: EACCES: permission denied, copyfile '/sandbox/.openclaw/openclaw.json.4372.1dfbfaec-f7ec-4615-941e-ae4c452087f4.tmp' -> '/sandbox/.openclaw/openclaw.json'
sandbox@helper:~$
Logs
Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate
same problem
I'm facing this issue on my ubuntu box when I tried installing nemoclaw. Should I wait for the new build? How do I proceed with onboarding?
Same
#514 sandbox having write access to this basically singular fail point is a huge security risk, but on the same token, openclaw expects you to write to it after deployment anyway so its a weird trade-off.
If you want to make openclaw.json writable again you can just comment out 152-156 of the Dockerfile and then nemoclaw destroy and onboard. then every live modification should work fine
just keep in mind the security risks mentioned in the issue (such as being able to forward the origin and let the internet talk to it) its a weird issue because there is functionally legitimate reason to modify this file but i get what theyre trying to do. for a safer temporary fix i suggest you modify the config to the preset channels and models etc inside the config var before deploying. you could customize it with the json readable and then copy it into the redeployment build which is what i did. hope this helps
This is the same root cause as #719 — DAC permissions on /sandbox/.openclaw/ block writes despite the Landlock policy allowing them. See this comment for the root cause analysis and Dockerfile fix.
Working plan update: this issue matches the current sandbox design tension around immutable openclaw.json. NemoClaw now bakes channel config at image build time and does not support runtime repair of /sandbox/.openclaw/openclaw.json from inside the sandbox.
Planned handling:
- docs and diagnostics will be updated so
openclaw doctor --fixis not treated as the primary repair path for sandbox-baked Discord config - we will keep the native messaging design and avoid reintroducing the bridge as the default fix
- Discord remediation work is proceeding on branch
fix/discord-native-remediationalongside the native gateway/proxy investigation
I’m treating this as a real UX/product bug, but secondary to the gateway/native-path failures. The goal is to make the immutable-config behavior explicit and avoid sending users down a dead-end repair path.
This is the same EACCES on .openclaw state that was fixed in the onboard and setup flows — see #572 for the full root cause. The fix passes NEMOCLAW_DISABLE_DEVICE_AUTH=1 so the pairing step doesn't block sandbox startup with a permission error. If you're still hitting this on the current version, please reopen with fresh logs.