{"record":{"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/ee20f426ddf338ac7ead5c5f00ea49258005caaf/src/filter/owner.rs#L14-L50","documentation":"OwnerFilter::from_string (filter/owner.rs:32) parses an --owner argument as 'uid:gid' using split(':') and rejects any input that yields a third segment. The owner grammar allows at most one colon separating an optional uid and optional gid; extra colons are unambiguously malformed rather than ambiguous.","triggerScenarios":"Passing `fd --owner 3:5:`, `fd --owner ::`, `fd --owner alice:bob:carol`, or any --owner value with two or more ':' characters. The third next() on the split iterator returning Some triggers the error.","commonSituations":"Attempting to chain multiple owner constraints in one flag (`--owner alice:bob:carol`); copy-paste artifacts with trailing colons; misunderstanding the uid:gid syntax as a list.","solutions":["Use exactly one colon: `fd --owner alice:bob` (uid:gid), or `fd --owner alice` (uid only), or `fd --owner :bob` (gid only).","To negate, prefix a segment with '!': `fd --owner '!alice'`.","Run `fd --help` and read the --owner section for the full grammar."],"exampleFix":"# before\nfd --owner alice:bob:carol\n\n# after (single uid:gid pair)\nfd --owner alice:bob","handlingStrategy":"validation","validationCode":"validate_owner() {\n  local v=\"$1\"\n  # allow at most one ':'\n  case \"$v\" in\n    *:*:*) echo \"too many colons\"; return 1 ;;\n    *) fd --owner \"$v\" ;;\n  esac\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-split uid and gid in your script and join with a single colon.","Document the uid:gid grammar for users to prevent list-style mistakes.","Unit-test the owner string before passing it to fd."],"tags":["owner-filter","parsing","cli","unix"],"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"}