fix(sandbox): add credentials directory to writable state layout#1126
Open
latenighthackathon wants to merge 1 commit intoNVIDIA:mainfrom
Open
fix(sandbox): add credentials directory to writable state layout#1126latenighthackathon wants to merge 1 commit intoNVIDIA:mainfrom
latenighthackathon wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
OpenClaw creates ~/.openclaw/credentials at runtime for storing auth tokens (WhatsApp, Telegram, OAuth). Since .openclaw is locked read-only (Landlock + root-owned DAC), the mkdir fails with EACCES. Add credentials to the .openclaw-data writable layout with a symlink, matching the pattern used for memory, agents, extensions, etc. Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
Contributor
📝 WalkthroughWalkthroughModified Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenClaw creates
~/.openclaw/credentialsat runtime for storing auth tokens (WhatsApp, Telegram, OAuth). Since.openclawis locked read-only via Landlock + root-owned DAC, themkdirfails withEACCES: permission denied.Same root cause pattern as the memory directory bug fixed in #1061.
Scope note: This PR addresses the
credentialsdirectory EACCES (error 3 in #1114). Theopenclaw.json.*.tmpEACCES errors (errors 1-2 in #1114) are a separate issue — OpenClaw's atomic config write creates temp files in the locked.openclaw/directory, which requires a different fix (either redirecting temp writes to.openclaw-data/or unlockingopenclaw.jsonownership to the sandbox user).Related Issue
Partially addresses #1114 (fixes credential directory access; openclaw.json temp file writes remain)
Changes
/sandbox/.openclaw-data/credentialsto the writable state directory layout inDockerfile.base/sandbox/.openclaw/credentials->/sandbox/.openclaw-data/credentialsmemory,agents,extensions, etc.Testing
npx prek run --all-filespasses (all checks pass; hadolint and ESLint failures are pre-existing on main)npm testpasses (38 passed, 1 failed — same baseline as main)Executed:
make checkequivalent in Docker (Linux): shellcheck, shfmt, hadolint, ESLint, gitleaks, markdownlint, Vitest all passhadolint Dockerfile.basepasses clean (no warnings from our change)Checklist