ipfs/kubo · error

%s path (%q) is not a directory

Error message

%s path (%q) is not a directory

What it means

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.

Source

Thrown at cmd/ipfs/kubo/daemon.go:1297

	fmt.Printf("MFS  mounted at: %s\n", mfsdir)
	return nil
}

func checkFusePath(name, path string) error {
	if path == "" {
		return fmt.Errorf("%s path cannot be empty", name)
	}

	fileInfo, err := os.Stat(path)
	if err != nil {
		if os.IsNotExist(err) {
			return fmt.Errorf("%s path (%q) does not exist: %w", name, path, err)
		}
		return fmt.Errorf("error while inspecting %s path (%q): %w", name, path, err)
	}

	if !fileInfo.IsDir() {
		return fmt.Errorf("%s path (%q) is not a directory", name, path)
	}

	return nil
}

func maybeRunGC(req *cmds.Request, node *core.IpfsNode) (<-chan error, error) {
	enableGC, _ := req.Options[enableGCKwd].(bool)
	if !enableGC {
		return nil, nil
	}

	errc := make(chan error)
	go func() {
		errc <- corerepo.PeriodicGC(req.Context, node)
		close(errc)
	}()
	return errc, nil
}

View on GitHub (pinned to 329838acdf)

Solutions

  1. Move or delete the file currently occupying the path and create a directory there instead
  2. Change the Mounts config entry to point at an existing empty directory
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/ipfs/kubo/daemon.go:1297 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/a1fec4373fefe2e0. Report an issue: GitHub.