OpenClaw fs.state_dir.perms_world_writable: What It Means and How to Fix It

Published 2026-10-22 · Updated 2026-10-22 · By The Is My Agent Safe team

Short answer

fs.state_dir.perms_world_writable is a finding from openclaw security audit. OpenClaw's docs rate it critical. Follow the fix steps below, then run openclaw security audit --deep again and check that the finding no longer appears.

This page covers one finding from OpenClaw's own security audit: what it means, how to fix it, and what to check afterward. It's based on OpenClaw's docs and source, linked at the end.

Paste your audit: run openclaw security audit --deep and paste the output into our free check for a red/amber/green result with the most important finding first (Limits of the check).

How to fix it

  1. Read the finding's detail. It gives the path and its current mode (for example mode=777), and the suggested fix names the chmod (or Windows icacls) command for that path.
  2. This stops your agent. It stays offline until you start it again a few steps below. Stop the Gateway with openclaw gateway stop, then make a backup with openclaw backup create. --fix also changes settings in your config.
  3. Run openclaw security audit --fix. OpenClaw's docs say it tightens permissions on the state directory, config and common sensitive files, using chmod on Linux and macOS and icacls on Windows. It also switches common open group policies to allowlist, so check your group settings afterward.
  4. Or fix it by hand: chmod 700 on each directory in the detail and chmod 600 on each file. For fs.state_dir.symlink, check where the link points, and that the target has the same tight permissions.
  5. Start the Gateway again and run the audit. If other accounts on this machine could have written to these files, treat it as a possible compromise: check for config changes you didn't make, and follow OpenClaw's full incident-response plan (linked in the sources below).
openclaw gateway stop
openclaw backup create
openclaw security audit --fix
# or by hand, using the paths in the detail:
chmod 700 ~/.openclaw
chmod 700 ~/.openclaw/credentials
chmod 600 ~/.openclaw/agents/main/sessions/sessions.json
openclaw gateway start
openclaw security audit --deep

After any change, run openclaw config validate. If you stopped the Gateway, start it with openclaw gateway start. Then run openclaw security audit --deep and check that the finding is gone.

OpenClaw's docs say openclaw security audit --fix can fix this finding. Make a backup first with openclaw backup create.

What this finding means

OpenClaw's audit raises this, as critical, when your OpenClaw state directory (usually ~/.openclaw) can be written by any user on the machine. The state directory holds your config, credentials, sessions and other agent state, and the finding's own text says "other users can write into your OpenClaw state". The related checkIds cover the same directory when it's group-writable, readable by others or a symlink, and the credentials folder, auth-profile files, sessions.json and your log file when other users can read or write them. OpenClaw's storage docs recommend 700 for directories and 600 for files.

checkIdRating in OpenClaw's docsWhat OpenClaw's docs say it flags
fs.state_dir.perms_world_writablecriticalOther users/processes can modify full OpenClaw state
fs.state_dir.perms_group_writablewarnGroup users can modify full OpenClaw state
fs.state_dir.perms_readablewarnState dir is readable by others
fs.state_dir.symlinkwarnState dir target becomes another trust boundary
fs.credentials_dir.perms_writablecriticalOthers can modify channel pairing/credential state
fs.credentials_dir.perms_readablewarnOthers can read channel credential state
fs.auth_profiles.perms_writablecriticalOthers can inject or replace stored model credentials
fs.auth_profiles.perms_readablewarnOthers can read API keys and OAuth tokens
fs.sessions_store.perms_readablewarnOthers can read session transcripts/metadata
fs.log_file.perms_readablewarnOthers can read raw, potentially credential-bearing logs

What it looks like in the audit output

Made-up example, not from a real agent:

CRITICAL fs.state_dir.perms_world_writable
State dir is world-writable
/home/alex/.openclaw mode=777; other users can write into your OpenClaw state.
Fix: chmod 700 /home/alex/.openclaw

False alarms and open reports

What our free check covers

The free check at /check is paste-only. We check the text you paste: your openclaw security audit output. The check never connects to your agent or tests anything live. Nothing is installed into the agent you're checking. Green means no issues found in the checks we ran. The free check puts the most important finding first, in plain English, with how to fix that one when we have steps for it. The full report explains every finding and lists the fixes in order. The check doesn't detect malicious skills. We don't review the code inside skills or MCP servers ourselves, beyond what OpenClaw's own audit reports. The check is free, and a full report is $29. See Limits of the check.

Next steps

Sources

  1. OpenClaw docs: security audit checks (checkId catalog)
  2. OpenClaw docs: openclaw backup
  3. OpenClaw docs: openclaw config (config file)
  4. OpenClaw 2026.10.5 source: src/security/audit.ts (where the check is defined)
  5. OpenClaw 2026.10.5 source: src/security/audit-extra.async.ts (credentials, auth-profile, session and log file checks)
  6. OpenClaw docs: secrets and storage (file permissions)
  7. OpenClaw docs: openclaw security (what --fix changes)
  8. OpenClaw docs: Gateway service commands (start, stop)
  9. OpenClaw GitHub issue #1957: Windows false positives for file permissions (closed)
  10. OpenClaw GitHub issue #3900: Windows false positives, mode=666 (closed)
  11. OpenClaw GitHub issue #16150: Windows SYSTEM account read as group-writable (closed)
  12. OpenClaw GitHub issue #22573: Windows perms_writable false positive with SYSTEM ACL (closed)
  13. OpenClaw GitHub issue #9065: state dir mode 775 after sudo npm install (closed)
  14. OpenClaw GitHub issue #35834: localized Windows SYSTEM shown as others-writable (closed)
  15. OpenClaw docs: operator incident response (full plan)