diff --git a/src/nex/attachment.rs b/src/nex/attachment.rs index ece2a92..8c3374d 100644 --- a/src/nex/attachment.rs +++ b/src/nex/attachment.rs @@ -59,6 +59,11 @@ impl Attachment { } _ => panic!(), // warn as unexpected } + #[cfg(any(target_os = "linux", target_os = "macos"))] + { + use std::{fs::Permissions, os::unix::fs::PermissionsExt}; + fs::set_permissions(target, Permissions::from_mode(0o640))?; // @TODO optional + } Ok(()) } }