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