{"record":{"id":"64a3b8e14c15d421","repo":"vercel/turborepo","slug":"socket-path-has-no-parent-sock-path","errorCode":null,"errorMessage":"socket path has no parent: {sock_path}","messagePattern":"socket path has no parent: (.+?)","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/turborepo-daemon/src/endpoint.rs","lineNumber":185,"sourceCode":"        });\n\n        Ok((lock, stream))\n    }\n}\n\n#[cfg(windows)]\nfn secure_socket_dir(sock_path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {\n    let socket_dir = socket_dir(sock_path)?;\n    if let Some(daemon_dir) = socket_dir.parent() {\n        secure_windows_dir(daemon_dir)?;\n    }\n    secure_windows_dir(socket_dir)\n}\n\n#[cfg(windows)]\nfn socket_dir(sock_path: &AbsoluteSystemPath) -> Result<&AbsoluteSystemPath, std::io::Error> {\n    sock_path.parent().ok_or_else(|| {\n        std::io::Error::new(\n            std::io::ErrorKind::InvalidInput,\n            format!(\"socket path has no parent: {sock_path}\"),\n        )\n    })\n}\n\n#[cfg(windows)]\nfn secure_windows_dir(path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {\n    path.create_dir_all()?;\n    windows_security::ensure_current_user_owns_path(path)?;\n    windows_security::set_owner_only_dacl(path, true)\n}\n\n#[cfg(windows)]\nfn secure_socket_file(sock_path: &AbsoluteSystemPath) -> Result<(), std::io::Error> {\n    windows_security::ensure_current_user_owns_path(sock_path)?;\n    windows_security::set_owner_only_dacl(sock_path, false)\n}","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/vercel/turborepo/blob/f9245100cf0d31d96628804ead485f6bf226e55a/crates/turborepo-daemon/src/endpoint.rs#L167-L203","documentation":"Before serving its socket, the Windows daemon hardens the socket's parent directory (and its grandparent) via secure_socket_dir -> socket_dir (endpoint.rs:185). socket_dir calls sock_path.parent() and this InvalidInput error means the configured socket path is a filesystem root like `C:\\`, which has no parent. Real daemon socket paths always sit under the user's temp/profile tree, so this is an internal invariant guard for a malformed override.","triggerScenarios":"Starting the daemon (turbo daemon or first backgrounded run) with a custom socket path that resolves to a drive root — e.g. an env override or test fixture passing `C:\\` / a root VERBATIM path.","commonSituations":"Custom TURBO socket-path environment/testing overrides pointing at a root A path-composition bug upstream truncating the path to its root","solutions":["Unset or fix any custom socket/daemon path override so the default per-user path is used","Verify the path printed in the message is what you intended; it must have at least one non-root component","If you changed nothing and still hit it, report a bug with the exact path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before constructing/overriding a daemon socket path\nlet parent = sock_path.parent()\n    .filter(|p| !p.as_std_path().as_os_str().is_empty());\nassert!(parent.is_some(), \"socket path must not be a filesystem root\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never override the daemon socket path with a drive root","Prefer the default per-user paths unless you have a specific reason"],"tags":["daemon","windows","socket","path","invariant"],"backgroundTag":"invalid-config-path","analyzedSha":"f9245100cf0d31d96628804ead485f6bf226e55a","analyzedAt":"2026-08-17T10:46:15.696Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}