mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Update v-restore-user: permissions fix
This commit is contained in:
parent
c1072ec9e4
commit
c5e5464373
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue