Skip to main content

parse_owner_spec

Function parse_owner_spec 

Source
pub fn parse_owner_spec(
    spec: &str,
) -> Result<(Option<u32>, Option<u32>), String>
Expand description

Parse an ownership specification string.

Accepted formats:

  • USER – set owner only
  • USER:GROUP or USER.GROUP – set both (dot form is deprecated)
  • USER: – set owner and group to that user’s login group
  • :GROUP – set group only
  • numeric IDs are accepted anywhere a name is accepted

Returns (Option<uid>, Option<gid>).