# docker：守护进程错误响应：挂载卷 '/host/path' 时出错：权限被拒绝

- **ID:** `docker/volume-mount-permission-denied-on-host`
- **领域:** docker
- **类别:** system_error
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

Docker 守护进程对绑定挂载中指定的主机目录缺乏读/写权限。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Docker 23.0.6 | active | — | — |
| Docker 24.0.2 | active | — | — |

## 解决方案

1. ```
   运行 'sudo chown -R root:root /host/path' 或将权限调整为 755，以确保 Docker 守护进程（以 root 身份运行）可以访问该目录。
   ```
2. ```
   如果使用 SELinux，运行 'sudo chcon -Rt svirt_sandbox_file_t /host/path' 为 Docker 卷设置正确的上下文。
   ```

## 无效尝试

- **** — Running container with --privileged flag ignores the underlying permission issue and may cause security risks. (40% 失败率)
- **** — Changing volume path to a different directory without fixing host permissions repeats the error. (80% 失败率)
