Guided task
Debug a File Path
Follow a failing path from the process directory to the directory permission that stops it.
A path can fail because it is resolved somewhere else, because a directory in the middle denies traversal, or because the file simply is not there. Read in this order so each check rules out one layer.
Reading path
Follow the checks
- 01 ENOENT and Relative Paths A relative path is resolved against the calling process's current working directory, so it works in the shell but fails in a program that a service manager, IDE, or cron started somewhere else. Anchor the path to the script's own directory or another absolute location instead of relying on the launcher's directory.
- 02 The Current Working Directory of a Process Each process carries its own current working directory in kernel state, and relative paths are resolved from it, so the same path string can name different files in different processes.
- 03 EACCES During Path Traversal EACCES means the kernel could not traverse the path because some directory component lacks search (x) permission for your effective user, or the final file lacks the requested access; the error does not identify the component. Check every ancestor with namei -l and inspect modes, ACLs, and mount options rather than only the leaf file.
- 04 How ripgrep Handles Ignored Files ripgrep skips paths matched by .gitignore, .ignore, or .rgignore, skips hidden dotfiles, and stops at binary files by default, while grep -r searches all of them. Use rg --files -uu, --no-ignore, --hidden, or -a to find out which filter is hiding the file.