# open /etc/passwd: permission denied

- **ID:** `go/os-permission-denied`
- **Domain:** go
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The process does not have sufficient permissions to access the file or directory.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.22 | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   Check permissions before access: if fi, err := os.Stat(path); err == nil && fi.Mode().Perm()&0444 == 0 { return errors.New("no read permission") }
   ```
2. **** (90% success)
   ```
   Use os.Open with proper error handling: f, err := os.Open(path); if err != nil { if os.IsPermission(err) { handle } }
   ```

## Dead Ends

- **** — Security risk; not always possible. (70% fail)
- **** — File not read; logic breaks. (90% fail)
