diff --git a/src/config/datastore.rs b/src/config/datastore.rs index 1e2c30ae..8d71f6f5 100644 --- a/src/config/datastore.rs +++ b/src/config/datastore.rs @@ -58,8 +58,8 @@ pub fn config() -> Result { pub fn save_config(config: &SectionConfigData) -> Result<(), Error> { let raw = CONFIG.write(DATASTORE_CFG_FILENAME, &config)?; - let (backup_uid, _) = crate::tools::getpwnam_ugid("backup")?; - let gid = nix::unistd::Gid::from_raw(backup_uid); + let (_, backup_gid) = crate::tools::getpwnam_ugid("backup")?; + let gid = nix::unistd::Gid::from_raw(backup_gid); let mode = nix::sys::stat::Mode::from_bits_truncate(0o0640); // set the correct owner/group/permissions while saving file // owner(rw) = root, group(r)= backup