Remove global and group permissions for backup folder

Fixes #15
This commit is contained in:
James Barnett
2016-11-29 07:50:57 -06:00
parent c22aae296c
commit b1c8121fa0

View File

@@ -144,7 +144,7 @@ for x in $selected_configs; do
read -r -p "Enter name of directory to store backups, relative to $selected_mnt (to be created if not existing): " mybackupdir read -r -p "Enter name of directory to store backups, relative to $selected_mnt (to be created if not existing): " mybackupdir
printf "This will be the initial backup for snapper configuration '%s' to this disk. This could take awhile.\n" "$x" printf "This will be the initial backup for snapper configuration '%s' to this disk. This could take awhile.\n" "$x"
BACKUPDIR="$selected_mnt/$mybackupdir" BACKUPDIR="$selected_mnt/$mybackupdir"
mkdir -p "$BACKUPDIR" mkdir -p -m700 "$BACKUPDIR"
else else
mybackupdir=$(snapper -c root list -t single | awk -F"|" '/'"$selected_uuid"'/ {print $5}' | awk -F "," '/backupdir/ {print $1}' | awk -F"=" '{print $2}') mybackupdir=$(snapper -c root list -t single | awk -F"|" '/'"$selected_uuid"'/ {print $5}' | awk -F "," '/backupdir/ {print $1}' | awk -F"=" '{print $2}')
BACKUPDIR="$selected_mnt/$mybackupdir" BACKUPDIR="$selected_mnt/$mybackupdir"