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
- Read the finding's detail. It gives the path and its current mode (for example
mode=777), and the suggested fix names thechmod(or Windowsicacls) command for that path. - 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 withopenclaw backup create.--fixalso changes settings in your config. - Run
openclaw security audit --fix. OpenClaw's docs say it tightens permissions on the state directory, config and common sensitive files, usingchmodon Linux and macOS andicaclson Windows. It also switches common open group policies toallowlist, so check your group settings afterward. - Or fix it by hand:
chmod 700on each directory in the detail andchmod 600on each file. Forfs.state_dir.symlink, check where the link points, and that the target has the same tight permissions. - 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.
Related checkIds covered on this page
| checkId | Rating in OpenClaw's docs | What OpenClaw's docs say it flags |
|---|---|---|
fs.state_dir.perms_world_writable | critical | Other users/processes can modify full OpenClaw state |
fs.state_dir.perms_group_writable | warn | Group users can modify full OpenClaw state |
fs.state_dir.perms_readable | warn | State dir is readable by others |
fs.state_dir.symlink | warn | State dir target becomes another trust boundary |
fs.credentials_dir.perms_writable | critical | Others can modify channel pairing/credential state |
fs.credentials_dir.perms_readable | warn | Others can read channel credential state |
fs.auth_profiles.perms_writable | critical | Others can inject or replace stored model credentials |
fs.auth_profiles.perms_readable | warn | Others can read API keys and OAuth tokens |
fs.sessions_store.perms_readable | warn | Others can read session transcripts/metadata |
fs.log_file.perms_readable | warn | Others 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
- Early 2026 versions reported false alarms on Windows because they read Unix-style mode bits instead of Windows permissions (#1957, #3900). The fix that switched to
icacls-based checks landed in January 2026. Later Windows reports about how theSYSTEMaccount was read (#16150, #22573, #35834) were closed as completed in February and March 2026. On Windows, compare the finding withicaclsoutput for the same path. - After
sudo npm install -g, one user saw~/.openclawat mode 775 and gotfs.state_dir.perms_group_writable(#9065). It was closed in February 2026: new state directories are created as700, andopenclaw security audit --fixtightens existing ones. - If you share the state directory with a group on purpose, OpenClaw keeps those permissions on normal writes, so the group findings stay. OpenClaw's storage docs say a group-writable state directory isn't a boundary against that group.
fs.log_file.perms_readableonly applies if you setlogging.file.
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
- OpenClaw fs.config.perms_world_readable and Related Config Permission Findings
- OpenClaw Security Audit: What Each Finding Means and What to Fix First
- Is This OpenClaw Audit Finding Real? Common False Alarms and How to Check
- Your AI Agent's API Keys May Have Leaked. Here's What to Do in the Next Hour
Sources
- OpenClaw docs: security audit checks (checkId catalog)
- OpenClaw docs: openclaw backup
- OpenClaw docs: openclaw config (config file)
- OpenClaw 2026.10.5 source: src/security/audit.ts (where the check is defined)
- OpenClaw 2026.10.5 source: src/security/audit-extra.async.ts (credentials, auth-profile, session and log file checks)
- OpenClaw docs: secrets and storage (file permissions)
- OpenClaw docs: openclaw security (what --fix changes)
- OpenClaw docs: Gateway service commands (start, stop)
- OpenClaw GitHub issue #1957: Windows false positives for file permissions (closed)
- OpenClaw GitHub issue #3900: Windows false positives, mode=666 (closed)
- OpenClaw GitHub issue #16150: Windows SYSTEM account read as group-writable (closed)
- OpenClaw GitHub issue #22573: Windows perms_writable false positive with SYSTEM ACL (closed)
- OpenClaw GitHub issue #9065: state dir mode 775 after sudo npm install (closed)
- OpenClaw GitHub issue #35834: localized Windows SYSTEM shown as others-writable (closed)
- OpenClaw docs: operator incident response (full plan)
Get the plain-English agent security brief
Agents & AI Security, explained: a short, plain-English email when we have something useful. Free. Unsubscribe any time.
We'll only use your email to send the newsletter. The newsletter is sent by beehiiv, which records opens and link clicks. Privacy policy.