mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
update file ownership on domain migration
This commit is contained in:
parent
d50fa973fe
commit
263df1cc0e
1 changed files with 8 additions and 0 deletions
|
@ -87,6 +87,10 @@ if [ ! -z "$web_data" ]; then
|
||||||
# Move data
|
# Move data
|
||||||
mv $HOMEDIR/$owner/web/$domain $HOMEDIR/$user/web/
|
mv $HOMEDIR/$owner/web/$domain $HOMEDIR/$user/web/
|
||||||
|
|
||||||
|
# Change ownership
|
||||||
|
find $HOMEDIR/$user/web/$domain -user $owner \
|
||||||
|
-exec chown -h $user:$user {} \;
|
||||||
|
|
||||||
# Rebuild config
|
# Rebuild config
|
||||||
$BIN/v-unsuspend-web-domain $user $domain no >> /dev/null 2>&1
|
$BIN/v-unsuspend-web-domain $user $domain no >> /dev/null 2>&1
|
||||||
$BIN/v-rebuild-web-domains $owner no
|
$BIN/v-rebuild-web-domains $owner no
|
||||||
|
@ -144,6 +148,10 @@ if [ ! -z "$mail_data" ]; then
|
||||||
# Move data
|
# Move data
|
||||||
mv $HOMEDIR/$owner/mail/$domain $HOMEDIR/$user/mail/
|
mv $HOMEDIR/$owner/mail/$domain $HOMEDIR/$user/mail/
|
||||||
|
|
||||||
|
# Change ownership
|
||||||
|
find $HOMEDIR/$user/mail/$domain -user $owner \
|
||||||
|
-exec chown -h $user {} \;
|
||||||
|
|
||||||
# Rebuild config
|
# Rebuild config
|
||||||
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
|
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
|
||||||
$BIN/v-rebuild-mail-domains $owner no
|
$BIN/v-rebuild-mail-domains $owner no
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue