Answer: For read-only code access, mount the directory read-only with `docker run -v /path/to/code:/workspace:ro agent-image`. For writable locations, use `tmpfs` mounts for ephemeral workspaces, an overlay filesystem to review changes before persisting, or a dedicated volume kept separate from sensitive directories for fully persistent output. Status: Confirmed Entry: tool/claude-code/permissions-and-security/filesystem-configuration Revision: 3 Digest: sha256:c298cdacf5f2d354 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:56Z Last changed: 2026-11-18T12:12:57Z (Ephemeral tmpfs size (/workspace): — → size=500m) Last verified: 2026-11-20T12:17:09Z Next check: 2026-11-21T12:17:09Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Read-only mount command | docker run -v /path/to/code:/workspace:ro agent-image | [1] | 2026-11-20 Ephemeral tmpfs size (/tmp) | size=100m | [1] | 2026-11-20 Ephemeral tmpfs size (/workspace) | size=500m | [1] | 2026-11-20 Overlay filesystem behavior | an overlay filesystem lets the agent write without modifying underlying files | [1] | 2026-11-20 Persistent output guidance | mount a dedicated volume but keep it separate from sensitive directories | [1] | 2026-11-20 Sources: [1] Anthropic. "Securely deploying AI agents". https://code.claude.com/docs/en/agent-sdk/secure-deployment.md Role: primary. Accessed: 2026-11-20T12:17:09Z Quote: "docker run -v /path/to/code:/workspace:ro agent-image" (Supports: Read-only mount command) Quote: "--tmpfs /tmp:rw,noexec,nosuid,size=100m" (Supports: Ephemeral tmpfs size (/tmp)) Quote: "--tmpfs /workspace:rw,noexec,size=500m" (Supports: Ephemeral tmpfs size (/workspace)) Quote: "an overlay filesystem lets the agent write without modifying underlying files" (Supports: Overlay filesystem behavior) Quote: "mount a dedicated volume but keep it separate from sensitive directories" (Supports: Persistent output guidance) Published: 2026-11-20T02:56:32Z Snapshot SHA-256: 1d1ad468499aa0fe108ba85c10f0be7697958d9287cb77d67d439f2ca880fa02 (captured 2026-11-17T12:21:16Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:21:19Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:09Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:09Z Last attempt: 2026-11-20T12:17:09Z Notes and limitations: Extracted automatically from a single official source (section "Filesystem configuration"). Related: https://latestn.com/tool/claude-code/permissions-and-security/foundry-azure-credentials How do I authenticate Claude Code with Microsoft Foundry using an API key, Microsoft Entra ID, or a bearer token? https://latestn.com/tool/claude-code/permissions-and-security/gate-inbound-messages How do I gate inbound messages in a Claude Code channel to only trusted senders? https://latestn.com/tool/claude-code/permissions-and-security/hold-tool-call-for-user How do I make a Claude Code mod hook hold a tool call until the user decides? https://latestn.com/tool/claude-code/permissions-and-security/enable-sandbox How do I enable or disable sandboxing in Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/enable-sandboxed-bash How do I enable the sandboxed Bash tool in Claude Code and confirm commands run inside the sandbox? https://latestn.com/tool/claude-code/permissions-and-security/enforce-policies What policies and restrictions can I enforce on Claude Code for my organization? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:12:57Z | changed | Ephemeral tmpfs size (/workspace): — → size=500m | [1] 2026-11-18T12:12:57Z | changed | Ephemeral tmpfs size (/tmp): — → size=100m | [1] 2026-11-18T12:12:57Z | changed | Workspace tmpfs mount example: --tmpfs /workspace:rw,noexec,size=500m → — | [1] 2026-11-18T12:12:57Z | changed | Ephemeral tmpfs mount example: --tmpfs /tmp:rw,noexec,nosuid,size=100m → — | [1] 2026-11-14T12:12:47Z | changed | Persistent output guidance: — → mount a dedicated volume but keep it separate from sensitive directories | [1] 2026-11-14T12:12:47Z | changed | Overlay filesystem behavior: — → an overlay filesystem lets the agent write without modifying underlying files | [1] 2026-11-14T12:12:47Z | changed | Workspace tmpfs mount example: — → --tmpfs /workspace:rw,noexec,size=500m | [1] 2026-11-14T12:12:47Z | changed | Ephemeral tmpfs mount example: — → --tmpfs /tmp:rw,noexec,nosuid,size=100m | [1] 2026-11-14T12:12:47Z | changed | Persistent output option: mount a dedicated volume but keep it separate from sensitive directories → — | [1] 2026-11-14T12:12:47Z | changed | Overlay filesystem option: an overlay filesystem lets the agent write without modifying underlying files → — | [1] 2026-11-14T12:12:47Z | changed | Ephemeral tmpfs /workspace mount: --tmpfs /workspace:rw,noexec,size=500m → — | [1] 2026-11-14T12:12:47Z | changed | Ephemeral tmpfs /tmp mount: --tmpfs /tmp:rw,noexec,nosuid,size=100m → — | [1] 2026-11-13T03:02:56Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/permissions-and-security/filesystem-configuration/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/permissions-and-security/filesystem-configuration POST: https://latestn.com/dispute/tool/claude-code/permissions-and-security/filesystem-configuration with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/permissions-and-security/filesystem-configuration?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure filesystem access and writable locations for a Claude Code deployment? Revision 3, last verified 2026-11-20T12:17:09Z. https://latestn.com/tool/claude-code/permissions-and-security/filesystem-configuration (accessed 2026-11-21T09:57:27Z). @misc{LatestN_tool_claude_code_permissions_and_security_filesystem_configuration_r3, title = {How do I configure filesystem access and writable locations for a Claude Code deployment?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/permissions-and-security/filesystem-configuration}}, note = {Revision 3; digest sha256:c298cdacf5f2d354; last verified 2026-11-20T12:17:09Z; accessed 2026-11-21T09:57:27Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/permissions-and-security/filesystem-configuration