mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
Fix for tar < 1.24 to preserve directory ownership
This commit is contained in:
parent
6d4da8dfe5
commit
b985c7ad9c
1 changed files with 5 additions and 0 deletions
|
@ -363,11 +363,16 @@ if [ "$web" != 'no' ]; then
|
||||||
exit $E_PARSING
|
exit $E_PARSING
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix for tar < 1.24
|
||||||
|
find $HOMEDIR/$user/web/$domain -type d \
|
||||||
|
-exec chown -h $user:$user {} \;
|
||||||
|
|
||||||
# ReChown files if uid differs
|
# ReChown files if uid differs
|
||||||
if [ "$old_uid" -ne "$new_uid" ]; then
|
if [ "$old_uid" -ne "$new_uid" ]; then
|
||||||
find $HOMEDIR/$user/web/$domain/ -user $old_uid \
|
find $HOMEDIR/$user/web/$domain/ -user $old_uid \
|
||||||
-exec chown -h $user:$user {} \;
|
-exec chown -h $user:$user {} \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Restart WEB
|
# Restart WEB
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue