# PermissionError: [Errno 13] Permission denied: '/tmp/pytest-of-user/pytest-123/test_foo0'

- **ID:** `python/pytest-tmpdir-permission-error`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest 临时目录权限不足，或已被其他进程占用

## Version Compatibility

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

## Workarounds

1. **** (85% success)
   ```
   pytest --basetemp=/home/user/mytmp
   ```
2. **** (70% success)
   ```
   chmod -R 775 /tmp/pytest-of-user
   ```

## Dead Ends

- **** — 如果权限问题源于系统，删除可能失败或需要 root (50% fail)
- **** — 如果不了解配置方法，可能引入新问题 (40% fail)
