From fcfe5f2ea5354d23aa202b6346a6f156738081e3 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 3 Feb 2025 10:53:31 +0100 Subject: [PATCH 1/2] set permission 700 on backup target dir --- localdump.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localdump.sh b/localdump.sh index 62412b8..ca336a6 100755 --- a/localdump.sh +++ b/localdump.sh @@ -129,6 +129,10 @@ color.echo "error" "FATAL ERROR: directory ${BACKUP_TARGETDIR} was not created" exit 1 fi + if ! chmod 0700 "${BACKUP_TARGETDIR}"; then + color.echo "error" "FATAL ERROR: permissions could not be set for ${BACKUP_TARGETDIR}." + exit 1 + fi } -- GitLab From 018d7c12272cbdbcf806febda5927e3380cdcd3a Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Mon, 3 Feb 2025 10:58:30 +0100 Subject: [PATCH 2/2] se 0700 on archive dirs (couchdb2) --- plugins/localdump/couchdb2.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/localdump/couchdb2.sh b/plugins/localdump/couchdb2.sh index ee352ce..ddc5a28 100755 --- a/plugins/localdump/couchdb2.sh +++ b/plugins/localdump/couchdb2.sh @@ -162,7 +162,8 @@ function _doBackupOfSingleInstance(){ for _dir in "${ARCHIVE_DIR}" "${ARCHIVE_DIR}/seq" "${ARCHIVE_DIR}/security" \ "${ARCHIVE_DIR2}" "${ARCHIVE_DIR2}/seq" "${ARCHIVE_DIR2}/security" do - test -d "$_dir" || (echo "creating $_dir" ; mkdir -p "$_dir" ) + test -d "$_dir" || (echo "creating $_dir" ; mkdir -p "$_dir" ) + chmod 0700 "$_dir" done local iChunksize=100 -- GitLab