tape: fix file permissions for tape encryptiuon keys

This commit is contained in:
Dietmar Maurer 2021-01-21 07:27:43 +01:00
parent 7acd5c5659
commit 4dafc513cc
2 changed files with 2 additions and 1 deletions

View File

@ -67,6 +67,7 @@ pub fn list_keys(
}
#[api(
protected: true,
input: {
properties: {
kdf: {

View File

@ -163,7 +163,7 @@ pub fn save_key_configs(map: HashMap<Fingerprint, KeyConfig>) -> Result<(), Erro
let raw = serde_json::to_string_pretty(&list)?;
let backup_user = crate::backup::backup_user()?;
let mode = nix::sys::stat::Mode::from_bits_truncate(0o0600);
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
let options = CreateOptions::new()