{"id":"3688fc95f02a337c","repo":"sharkdp/fd","slug":"more-than-one-present-in-owner-string-se","errorCode":null,"errorMessage":"more than one ':' present in owner string '{}'. See 'fd --help'.","messagePattern":"more than one ':' present in owner string '(.+?)'\\. See 'fd --help'\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/filter/owner.rs","lineNumber":32,"sourceCode":"    NotEq(T),\n    Ignore,\n}\n\nimpl OwnerFilter {\n    const IGNORE: Self = OwnerFilter {\n        uid: Check::Ignore,\n        gid: Check::Ignore,\n    };\n\n    /// Parses an owner constraint\n    /// Returns an error if the string is invalid\n    /// 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 {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/sharkdp/fd/blob/41532d114e2ba565fb5367d606c111b29b96450c/src/filter/owner.rs#L14-L50","documentation":"Thrown by OwnerFilter::from_string in src/filter/owner.rs:32 when the --owner argument, split on ':', yields more than two segments. The owner grammar is strictly '[!]user:[!]group' — a single colon separates uid from gid; anything with two or more colons is unparseable.","triggerScenarios":"Passing 'fd --owner 3:5:', 'fd --owner ::', 'fd --owner a:b:c', or any value where split(':').count() > 2.","commonSituations":"Typing a Windows-style drive path by mistake; copy-pasting a 'user:group:extra' triple; trying to chain multiple uid constraints in one flag.","solutions":["Use exactly one colon: 'fd --owner alice:developers'.","Negate either side with leading '!' rather than extra colons: 'fd --owner !alice:!root'.","Omit the side you don't care about: 'fd --owner alice' (uid only) or 'fd --owner :developers' (gid only)."],"exampleFix":"// before\nfd --owner 1000:1000:\n\n// after\nfd --owner 1000:1000","handlingStrategy":"validation","validationCode":"if [ \"$(printf '%s' \"$OWNER\" | tr -cd ':' | wc -c)\" -gt 1 ]; then\n  echo \"--owner must contain at most one ':'\" >&2; exit 1\nfi\nfd --owner \"$OWNER\"","typeGuard":"fn has_at_most_one_colon(s: &str) -> bool {\n    s.matches(':').count() <= 1\n}","tryCatchPattern":null,"preventionTips":["Validate --owner strings (uid, uid:, :gid, uid:gid) before invoking fd.","Reject any value with more than one colon upstream.","Document the [!]user:[!]group grammar wherever --owner is exposed."],"tags":["owner-filter","parsing","cli-flag","unix"],"analyzedSha":"41532d114e2ba565fb5367d606c111b29b96450c","analyzedAt":"2026-08-06T01:39:28.509Z","schemaVersion":2}