[Bug] Write tool ignores system umask, hardcodes 600 file permissions

Resolved 💬 3 comments Opened Dec 23, 2025 by harshh-jainn Closed Dec 26, 2025

Bug Description
Title: Write tool still ignores umask in version 2.0.75 - creates files with 600 permissions

Description:

## Issue
The Write tool continues to ignore the system umask setting and creates files with hardcoded 600 permissions in version 2.0.75, despite issue #12172 being marked as closed.

## Environment

  • Claude Code Version: 2.0.75
  • System umask: 0002
  • Expected permissions: 664 (-rw-rw-r--)
  • Actual permissions: 600 (-rw-------)

## Reproduction
```bash
$ umask
0002
$ claude "Write a file called test.txt with content: test"
$ ls -la test.txt
-rw------- 1 user group 116 Dec 23 05:41 test.txt

Impact

This bug completely breaks multi-user development environments where:

  • Multiple users need to collaborate on the same files
  • Service accounts (like Claude running as a different user) need to modify files created by developers
  • Group-writable permissions are required for team collaboration

Our entire Exocode container is blocked from upgrading because this breaks the two-user security model (dev + exo users).

Issue #12172 Status

Issue #12172 was closed with a workaround using PostToolUse hooks, but the underlying Write tool bug was never actually fixed. The workaround adds complexity and doesn't address the root cause.

Request

Please fix the Write tool to respect the system umask setting instead of hardcoding permissions. This is breaking production multi-user development environments.

Workaround (temporary)

Add this to .claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "chmod 664 \"$TOOL_INPUT_FILE_PATH\" 2>/dev/null || true"
}
]
}
]
}
}

This is a band-aid solution that shouldn't be necessary.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.75
  • Feedback ID: c15d0870-4909-48b0-9404-9f165a3a1108

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗