Hi, What determines the umask of sieve_pipe_bin_dir scripts ? The results from my script are always being set to 0600. My script is simple and shown below, even if I adjust the right line to add " && chmod 644", the actual resulting file still remains at 0600 ?!? #!/bin/bash # Usage: imapsieve_copy <email> <spam|ham> MSG_USER="$1" MSG_TYPE="$2" RUN_UUID=$(cat /proc/sys/kernel/random/uuid) BASE_DIR="/foo/bar" TARGET_DIR="${BASE_DIR}/${MSG_TYPE}" TARGET_FILE="${TARGET_DIR}/${RUN_UUID}" cat > "${TARGET_FILE}" < /dev/stdin && pigz -9 "${TARGET_FILE}"
> On 27/05/2020 13:28 Laura Smith <n5d9xq3ti233xiyif2vp at protonmail.ch> wrote: > > > Hi, > What determines the umask of sieve_pipe_bin_dir scripts ? > The results from my script are always being set to 0600. > My script is simple and shown below, even if I adjust the right line to add " && chmod 644", the actual resulting file still remains at 0600 ?!? > > #!/bin/bash > > # Usage: imapsieve_copy <email> <spam|ham> > > MSG_USER="$1" > MSG_TYPE="$2" > > RUN_UUID=$(cat /proc/sys/kernel/random/uuid) > BASE_DIR="/foo/bar" > TARGET_DIR="${BASE_DIR}/${MSG_TYPE}" > TARGET_FILE="${TARGET_DIR}/${RUN_UUID}" > > cat > "${TARGET_FILE}" < /dev/stdin && pigz -9 "${TARGET_FILE}"You can run umask 0222 to change it. Aki
On Wednesday, 27 May 2020 11:31, Aki Tuomi <aki.tuomi at open-xchange.com> wrote:> > On 27/05/2020 13:28 Laura Smith n5d9xq3ti233xiyif2vp at protonmail.ch wrote: > > Hi, > > What determines the umask of sieve_pipe_bin_dir scripts ? > > The results from my script are always being set to 0600. > > My script is simple and shown below, even if I adjust the right line to add " && chmod 644", the actual resulting file still remains at 0600 ?!? > > #!/bin/bash > > > > Usage: imapsieve_copy <email> <spam|ham> > > > > ========================================> > > > MSG_USER="$1" > > MSG_TYPE="$2" > > RUN_UUID=$(cat /proc/sys/kernel/random/uuid) > > BASE_DIR="/foo/bar" > > TARGET_DIR="${BASE_DIR}/${MSG_TYPE}" > > TARGET_FILE="${TARGET_DIR}/${RUN_UUID}" > > cat > "${TARGET_FILE}" < /dev/stdin && pigz -9 "${TARGET_FILE}" > > You can run > > umask 0222 > > to change it. > > AkiThat did the trick, thanks.
Reasonably Related Threads
- Determinant of umask for sieve_pipe_bin_dir scripts?
- [PATCH] put xenstore headers in linux-public
- rsync permissions and directory issues
- DO NOT REPLY [Bug 4621] "-p" option to simulate "mkdir -p" for rsync
- Parallel compression support for saving to rds/rdata files?