From 2380e8498590e4cd748d1dd9d6ce381fc0e5039f Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 25 May 2021 22:31:11 +0100 Subject: [PATCH] imap-download: chmod attachment before mv --- images/imap-download/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/imap-download/run.sh b/images/imap-download/run.sh index ab24400..34b70c6 100755 --- a/images/imap-download/run.sh +++ b/images/imap-download/run.sh @@ -38,7 +38,9 @@ do_attachments() { # Move the attachment files to the output directory while read -r attachment; do log_msg "Extracted attachment ${attachment}"; + chmod 0775 "${temp_dir}/${attachment}"; mv "${attachment}" "${target_dir}"; + done < <(find "${temp_dir}" -type f); done < <(find "${dir_newmail}" -type f); done