Skip to content

Commit

Permalink
Create the backup folder with a better rights setup.
Browse files Browse the repository at this point in the history
Backup folder created with user root and group staff mode 660.
  • Loading branch information
thctlo committed Aug 2, 2019
1 parent 8945cc8 commit 9ce4807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup-script/backup_samba4
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
# - make keep_day work, in test now.
# Revised 2017-12-19, Louis van Belle, Thanks Norbert Hanke.:
# - Fixed detection of samba/etc with a self compiled samba.
# Revised 2019-08-01, Louis van Belle, Thanks Norbert Hanke.:
##

# Used format in the backup file names.
Expand Down Expand Up @@ -195,10 +196,9 @@ fi
if [ ! -d $STOREDIR ]; then
${DEBUG} "Missing backup directory $STOREDIR"
${DEBUG} "Will now create it."
mkdir -p $STOREDIR
install -d "${STOREDIR}" -o root -g staff -m 660
fi


# get where the directory that holds smb.conf is stored
CONFBASE=$(${CMD_SAMBA} -b | ${CMD_GREP} [C]ONFIGFILE | ${CMD_AWK} '{print $NF}' | ${CMD_AWK} -F '/' '{print $2}')
if [ "${CONFBASE}" = "etc" ]; then
Expand Down

0 comments on commit 9ce4807

Please sign in to comment.