File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed
Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,14 @@ check_backup_conditions
5656if [ -z " $BACKUP " ]; then
5757 BACKUP=/backup
5858fi
59- mkdir -p $BACKUP
59+
60+ # Check if backup folder exists and have the correct permission
61+ if [[ ! -d " $BACKUP " ]]; then
62+ mkdir -p $BACKUP
63+ fi
64+ if [ $( stat -c %a $BACKUP ) != 755 ]; then
65+ chmod 755 $BACKUP
66+ fi
6067
6168# Get current time
6269start_time=$( date ' +%s' )
Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ is_format_valid 'user' 'backup'
6464# Action #
6565# ----------------------------------------------------------#
6666
67+ # Check if backup folder exists and have the correct permission
68+ if [[ ! -d " $BACKUP " ]]; then
69+ mkdir -p $BACKUP
70+ fi
71+ if [ $( stat -c %a $BACKUP ) != 755 ]; then
72+ chmod 755 $BACKUP
73+ fi
74+
6775# Checking local backup
6876if [ ! -e " $BACKUP /$backup " ]; then
6977 if [[ " $BACKUP_SYSTEM " =~ " google" ]]; then
Original file line number Diff line number Diff line change @@ -1843,8 +1843,9 @@ systemctl start hestia
18431843check_result $? " hestia start failed"
18441844chown admin:admin $HESTIA /data/sessions
18451845
1846- # Create backup folder
1846+ # Create backup folder and set correct permission
18471847mkdir -p /backup/
1848+ chmod 755 /backup/
18481849
18491850# ----------------------------------------------------------#
18501851# Configure File Manager #
Original file line number Diff line number Diff line change @@ -1871,8 +1871,9 @@ systemctl start hestia
18711871check_result $? " hestia start failed"
18721872chown admin:admin $HESTIA /data/sessions
18731873
1874- # Create backup folder
1874+ # Create backup folder and set correct permission
18751875mkdir -p /backup/
1876+ chmod 755 /backup/
18761877
18771878# ----------------------------------------------------------#
18781879# Configure File Manager #
You can’t perform that action at this time.
0 commit comments