{"record":{"id":"d722107e77370179","repo":"juicedata/juicefs","slug":"get-inode-of-s-s","errorCode":null,"errorMessage":"get inode of %s: %s","messagePattern":"get inode of (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/clone.go","lineNumber":164,"sourceCode":"\t}\n\n\tprogress := utils.NewProgress(false)\n\tdefer progress.Done()\n\tbar := progress.AddCountBar(\"Cloning entries\", 0)\n\tif _, errno := readProgress(f, func(count uint64, total uint64) {\n\t\tbar.SetTotal(int64(total))\n\t\tbar.SetCurrent(int64(count))\n\t}); errno != 0 {\n\t\treturn fmt.Errorf(\"clone failed: %v\", errno)\n\t}\n\treturn nil\n}\n\nfunc findMountpoint(fpath string) (string, error) {\n\tfor p := fpath; p != \"/\"; p = filepath.Dir(p) {\n\t\tinode, err := utils.GetFileInode(p)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"get inode of %s: %s\", p, err)\n\t\t}\n\t\tif inode == uint64(meta.RootInode) {\n\t\t\treturn p, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"%s is not inside JuiceFS\", fpath)\n}\n","sourceCodeStart":146,"sourceCodeEnd":172,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/clone.go#L146-L172","documentation":"findMountpoint walks up from a path toward '/', calling utils.GetFileInode on each ancestor until it finds the JuiceFS root inode. If any intermediate stat fails (unreachable mount, permission denied, dangling symlink), the walk aborts with \"get inode of %s: %s\" naming the exact ancestor path that could not be inspected.","triggerScenarios":"Running `juicefs clone` or `juicefs bench` with SRC/DST under a path where some ancestor cannot be stat'ed — e.g. a parent directory without +x permission for the user, a dead autofs map entry, or an unresponsive FUSE mount in the path chain.","commonSituations":"Passing a path through a directory the user cannot traverse (common with other users' home dirs); autofs-mounted path not yet triggered; VPN/network storage path in the prefix temporarily down; typo creating a nonexistent prefix (ENOENT).","solutions":["Run `namei -l <path>` to find the first untraversable component and fix its permissions or existence","`cd` into the mountpoint and use relative or shorter paths that avoid problem ancestors","Ensure the mountpoint is active: ls the mount directory directly, remount if dead","Run the command as a user with traverse permission on every component (or via sudo)"],"exampleFix":"# before\njuicefs bench /home/otheruser/jfs-mount  # get inode of /home/otheruser: permission denied\n// after\nsudo -u otheruser juicefs bench /home/otheruser/jfs-mount","handlingStrategy":"validation","validationCode":"for p := absPath; p != \"/\"; p = filepath.Dir(p) {\n    if _, err := os.Stat(p); err != nil {\n        return fmt.Errorf(\"cannot traverse %s: %w\", p, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := runBenchOrClone(p); strings.Contains(err.Error(), \"get inode of \") {\n    // namei -l p to locate the bad ancestor, fix perms, retry\n}","preventionTips":["Run as a user with +x on every ancestor of the path","Avoid paths passing through other users' home directories","Pre-trigger autofs paths before scripted operations","Use namei -l in preflight checks for deep path chains"],"tags":["cli","filesystem","inode","permissions"],"backgroundTag":"permission-denied","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}