Skip to content
Snippets Groups Projects
Commit 9e4d7848 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '7771-harden-postgres-backup' into 'master'

7771 harden postgres backup

See merge request !155
parents 1db0b45e 018d7c12
Branches master
No related tags found
1 merge request!1557771 harden postgres backup
...@@ -129,6 +129,10 @@ ...@@ -129,6 +129,10 @@
color.echo "error" "FATAL ERROR: directory ${BACKUP_TARGETDIR} was not created" color.echo "error" "FATAL ERROR: directory ${BACKUP_TARGETDIR} was not created"
exit 1 exit 1
fi fi
if ! chmod 0700 "${BACKUP_TARGETDIR}"; then
color.echo "error" "FATAL ERROR: permissions could not be set for ${BACKUP_TARGETDIR}."
exit 1
fi
} }
......
...@@ -162,7 +162,8 @@ function _doBackupOfSingleInstance(){ ...@@ -162,7 +162,8 @@ function _doBackupOfSingleInstance(){
for _dir in "${ARCHIVE_DIR}" "${ARCHIVE_DIR}/seq" "${ARCHIVE_DIR}/security" \ for _dir in "${ARCHIVE_DIR}" "${ARCHIVE_DIR}/seq" "${ARCHIVE_DIR}/security" \
"${ARCHIVE_DIR2}" "${ARCHIVE_DIR2}/seq" "${ARCHIVE_DIR2}/security" "${ARCHIVE_DIR2}" "${ARCHIVE_DIR2}/seq" "${ARCHIVE_DIR2}/security"
do do
test -d "$_dir" || (echo "creating $_dir" ; mkdir -p "$_dir" ) test -d "$_dir" || (echo "creating $_dir" ; mkdir -p "$_dir" )
chmod 0700 "$_dir"
done done
local iChunksize=100 local iChunksize=100
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment