grant pilerUser permission to write to tmp dir

This commit is contained in:
Asif Bacchus 2019-07-25 12:42:20 -06:00
parent 9c8c250318
commit 257667f12a
2 changed files with 6 additions and 2 deletions

View File

@ -6,13 +6,13 @@
-1,
301,
46,
386,
-1,
-1,
-1,
-1,
-1,
-1,
-1
637
]
}
]

View File

@ -391,6 +391,10 @@ printf "${cyan}[%s] -- [INFO] Exporting EML files from piler --${norm}\n" \
if ! exportDir=$( mktemp -d 2>>"$logFile" ); then
exitError 111 "Could not create temporary directory for exported EML files"
fi
# grant pilerUser permission to write to temporary directory
if ! chown root:${pilerUser} "$exportDir" && chmod 660 "$exportDir"; then
exitError 112 "Could not set permissions on temporary directory"
fi
if ! cd "$exportDir"; then
exitError 113 "Unable to change to temporary export directory"
fi