{"record":{"id":"a1fec4373fefe2e0","repo":"ipfs/kubo","slug":"s-path-q-is-not-a-directory","errorCode":null,"errorMessage":"%s path (%q) is not a directory","messagePattern":"(.+?) path \\(%q\\) is not a directory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":1297,"sourceCode":"\tfmt.Printf(\"MFS  mounted at: %s\\n\", mfsdir)\n\treturn nil\n}\n\nfunc checkFusePath(name, path string) error {\n\tif path == \"\" {\n\t\treturn fmt.Errorf(\"%s path cannot be empty\", name)\n\t}\n\n\tfileInfo, err := os.Stat(path)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"%s path (%q) does not exist: %w\", name, path, err)\n\t\t}\n\t\treturn fmt.Errorf(\"error while inspecting %s path (%q): %w\", name, path, err)\n\t}\n\n\tif !fileInfo.IsDir() {\n\t\treturn fmt.Errorf(\"%s path (%q) is not a directory\", name, path)\n\t}\n\n\treturn nil\n}\n\nfunc maybeRunGC(req *cmds.Request, node *core.IpfsNode) (<-chan error, error) {\n\tenableGC, _ := req.Options[enableGCKwd].(bool)\n\tif !enableGC {\n\t\treturn nil, nil\n\t}\n\n\terrc := make(chan error)\n\tgo func() {\n\t\terrc <- corerepo.PeriodicGC(req.Context, node)\n\t\tclose(errc)\n\t}()\n\treturn errc, nil\n}","sourceCodeStart":1279,"sourceCodeEnd":1315,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L1279-L1315","documentation":"checkFusePath found the configured mountpoint path, but os.Stat reports it is not a directory (a regular file, socket, device, etc.). FUSE can only mount over a directory, so mountFuse aborts. %s is the mount name and %q the offending path.","triggerScenarios":"Thrown at cmd/ipfs/kubo/daemon.go:1297 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move or delete the file currently occupying the path and create a directory there instead","Change the Mounts config entry to point at an existing empty directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}