1
0
mirror of https://github.com/myvesta/vesta.git synced 2025-03-12 04:35:23 -07:00

Update v-restore-user: permissions fix

This commit is contained in:
myvesta 2025-01-03 17:16:07 +01:00 committed by GitHub
parent c1072ec9e4
commit c5e5464373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -417,6 +417,7 @@ if [ "$web" != 'no' ] && [ ! -z "$WEB_SYSTEM" ]; then
# Restoring web domain data
chown $user $tmpdir
chmod u+w $HOMEDIR/$user/web/$domain
chmod 0755 $tmpdir/web/$domain
sudo -u $user tar -xzpf $tmpdir/web/$domain/domain_data.tar.gz \
-C $HOMEDIR/$user/web/$domain/ --exclude=./logs/* \
2> $HOMEDIR/$user/web/$domain/restore_errors.log
@ -618,6 +619,7 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
if [ -e "$tmpdir/mail/$domain/accounts.tar.gz" ]; then
chown $user $tmpdir
chmod u+w $HOMEDIR/$user/mail/$domain_idn
chmod 0755 $tmpdir/mail/$domain
sudo -u $user tar -xzpf $tmpdir/mail/$domain/accounts.tar.gz \
-C $HOMEDIR/$user/mail/$domain_idn/
if [ "$?" -ne 0 ]; then