-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
openclaw agent startup resets ~/.openclaw to 755 via default-umask mkdirSync #92771
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
openclaw agentstartup callsfs.mkdirSync(dir, { recursive: true })without an explicit mode argument. On Linux, this defaults to 755 via the process umask, resetting~/.openclawfrom 700 to 755.The doctor in
doctor-state-integrity-Dup_jTAf.jsdetects this and applieschmodSync(stateDir, 448)(chmod 700), but only on certain CLI entrypoints — not duringsecurity auditor any path that does not trigger the doctor.Reproduction
chmod 700 ~/.openclaw(confirm it is 700)openclaw agent --agent main --message "test"(or any agent invocation)stat ~/.openclaw— mode is now 755Expected
~/.openclawstays 700 after agent startupActual
~/.openclawis reset to 755Workaround
Add
chmod 700 ~/.openclawafter any script that callsopenclaw agent.Suggested fix
Pass
{ recursive: true, mode: 0o700 }tofs.mkdirSyncwhen creating the state directory, or run the doctor normalization on all CLI entrypoints includingsecurity audit.