{"record":{"id":"55dc486efd308188","repo":"sharkdp/fd","slug":"is-not-a-recognized-user-name","errorCode":null,"errorMessage":"'{}' is not a recognized user name","messagePattern":"'(.+?)' is not a recognized user name","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/filter/owner.rs","lineNumber":44,"sourceCode":"    /// Returns Ok(None) when string is acceptable but a noop (such as \"\" or \":\")\n    pub fn from_string(input: &str) -> Result<Self> {\n        let mut it = input.split(':');\n        let (fst, snd) = (it.next(), it.next());\n\n        if it.next().is_some() {\n            return Err(anyhow!(\n                \"more than one ':' present in owner string '{}'. See 'fd --help'.\",\n                input\n            ));\n        }\n\n        let uid = Check::parse(fst, |s| {\n            if let Ok(uid) = s.parse() {\n                Ok(uid)\n            } else {\n                User::from_name(s)?\n                    .map(|user| user.uid.as_raw())\n                    .ok_or_else(|| anyhow!(\"'{}' is not a recognized user name\", s))\n            }\n        })?;\n        let gid = Check::parse(snd, |s| {\n            if let Ok(gid) = s.parse() {\n                Ok(gid)\n            } else {\n                Group::from_name(s)?\n                    .map(|group| group.gid.as_raw())\n                    .ok_or_else(|| anyhow!(\"'{}' is not a recognized group name\", s))\n            }\n        })?;\n\n        Ok(OwnerFilter { uid, gid })\n    }\n\n    /// If self is a no-op (ignore both uid and gid) then return `None`, otherwise wrap in a `Some`\n    pub fn filter_ignore(self) -> Option<Self> {\n        if self == Self::IGNORE {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/sharkdp/fd/blob/ee20f426ddf338ac7ead5c5f00ea49258005caaf/src/filter/owner.rs#L26-L62","documentation":"The uid portion of --owner (before the colon) is parsed as a number first; if that fails fd falls back to a system username lookup via nix::unistd::User::from_name. If that lookup returns None the name does not correspond to a real account, so the filter cannot be built (filter/owner.rs:44). A leading '!' is stripped before lookup to support negation.","triggerScenarios":"Passing `fd --owner nonexistentuser`, `fd --owner alice:` for a typo'd or deleted account, or a username that exists only in a nameservice fd cannot reach (NIS/LDAP unavailable).","commonSituations":"Typos in usernames; accounts removed between composing and running the command; containers where the passwd database lacks the expected user; running as a UID with no matching name while specifying a name.","solutions":["Verify the account exists: `id <name>` or `getent passwd <name>`.","Use the numeric uid instead: `fd --owner 1000`.","Correct the spelling of the username."],"exampleFix":"# before\nfd --owner alicia\n\n# after (confirm with id, then use correct name or uid)\nid alicia || fd --owner 1000","handlingStrategy":"validation","validationCode":"ensure_user() {\n  local u=\"$1\"\n  if id \"$u\" >/dev/null 2>&1; then\n    fd --owner \"$u\"\n  else\n    fd --owner \"$(id -u)\"  # fall back to numeric uid\n  fi\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve usernames with `id` or `getent passwd` before passing to fd.","Prefer numeric uids in portable scripts to avoid nameservice dependencies.","Confirm the user exists in the same namespace/container fd runs in."],"tags":["owner-filter","parsing","unix","user-lookup"],"backgroundTag":null,"analyzedSha":"ee20f426ddf338ac7ead5c5f00ea49258005caaf","analyzedAt":"2026-08-09T08:21:40.573Z","contentChangedAt":"2026-08-09T08:21:40.573Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}