{
  "id": "docker/volume-mount-permission-denied-on-host",
  "signature": "docker: Error response from daemon: error while mounting volume '/host/path': permission denied",
  "signature_zh": "docker：守护进程错误响应：挂载卷 '/host/path' 时出错：权限被拒绝",
  "regex": "error while mounting volume.*permission denied",
  "domain": "docker",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Docker daemon lacks read/write permission on the host directory specified in a bind mount.",
  "root_cause_type": "generic",
  "root_cause_zh": "Docker 守护进程对绑定挂载中指定的主机目录缺乏读/写权限。",
  "versions": [
    {
      "version": "Docker 23.0.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 24.0.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running container with --privileged flag ignores the underlying permission issue and may cause security risks.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing volume path to a different directory without fixing host permissions repeats the error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run 'sudo chown -R root:root /host/path' or adjust permissions to 755 to ensure Docker daemon (running as root) can access the directory.",
      "success_rate": 0.9,
      "how": "Run 'sudo chown -R root:root /host/path' or adjust permissions to 755 to ensure Docker daemon (running as root) can access the directory.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using SELinux, run 'sudo chcon -Rt svirt_sandbox_file_t /host/path' to set proper context for Docker volumes.",
      "success_rate": 0.85,
      "how": "If using SELinux, run 'sudo chcon -Rt svirt_sandbox_file_t /host/path' to set proper context for Docker volumes.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "运行 'sudo chown -R root:root /host/path' 或将权限调整为 755，以确保 Docker 守护进程（以 root 身份运行）可以访问该目录。",
    "如果使用 SELinux，运行 'sudo chcon -Rt svirt_sandbox_file_t /host/path' 为 Docker 卷设置正确的上下文。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.docker.com/storage/bind-mounts/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}