{"id":"0451accf6d503f1c","repo":"sharkdp/fd","slug":"is-not-a-recognized-group-name","errorCode":null,"errorMessage":"'{}' is not a recognized group name","messagePattern":"'(.+?)' is not a recognized group name","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/filter/owner.rs","lineNumber":53,"sourceCode":"            ));\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 {\n            None\n        } else {\n            Some(self)\n        }\n    }\n\n    pub fn matches(&self, md: &fs::Metadata) -> bool {\n        use std::os::unix::fs::MetadataExt;\n","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/sharkdp/fd/blob/41532d114e2ba565fb5367d606c111b29b96450c/src/filter/owner.rs#L35-L71","documentation":"Thrown in src/filter/owner.rs:53 during OwnerFilter::from_string. The gid token failed integer parse, then nix::unistd::Group::from_name returned None, so no group database entry matches the supplied name.","triggerScenarios":"Passing 'fd --owner :ghost' or 'fd --owner alice:ghost' where 'ghost' is not a numeric gid and not present in /etc/group (or the NSS group database).","commonSituations":"Typo in group name; container missing the host's /etc/group; querying a group that only exists under a different namespace.","solutions":["Verify the group: 'getent group <name>'.","Use the numeric gid: 'fd --owner :1000'.","Ensure /etc/group (or NSS/ldap) is populated in the runtime, then retry."],"exampleFix":"// before\nfd --owner :devs\n\n// after\ngetent group devs || fd --owner :1000","handlingStrategy":"validation","validationCode":"if ! getent group \"${GID_PART}\" >/dev/null 2>&1 && ! [[ \"$GID_PART\" =~ ^[0-9]+$ ]]; then\n  echo \"unknown group: $GID_PART\" >&2; exit 1\nfi\nfd --owner \":$GID_PART\"","typeGuard":"fn gid_resolves(name: &str) -> bool {\n    name.parse::<u32>().is_ok()\n        || nix::unistd::Group::from_name(name).ok().flatten().is_some()\n}","tryCatchPattern":null,"preventionTips":["Validate the gid half with 'getent group' before invoking fd.","Use numeric gids in scripts to sidestep name resolution.","Ensure /etc/group (or NSS) is available in the runtime."],"tags":["owner-filter","parsing","unix","group-lookup"],"analyzedSha":"41532d114e2ba565fb5367d606c111b29b96450c","analyzedAt":"2026-08-06T01:39:28.509Z","schemaVersion":2}