Function bdrck::fs::set_ownership
source · pub fn set_ownership<P: AsRef<Path>>(
path: P,
uid: u32,
gid: u32,
fail_on_access_denied: bool,
follow: bool
) -> Result<()>
Expand description
This function is a safe wrapper around chown(). If fail_on_access_denied is set to true, then an EACCES error is considered a failure, and we’ll return Err(…). Otherwise, this is considered a soft failure, and a warning will be logged, but Ok(()) will still be returned.