- Changed default temp directory to local backend/temp instead of system temp
- Added write permission test during temp directory initialization
- Implemented fallback to OS temp directory if local temp fails
- Added unique random suffix to policy filenames to avoid conflicts
- Set proper file permissions (0o644) when writing policy files
- Improved error handling for temp directory creation failures
- Fixed fs.constants reference for file access checks
This resolves the EACCES permission denied error when creating policies
in Docker/production environments.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>