fix: Change ownership of destination folder
The "old_users" folders in users' home and work could be created with root owner instead of the intended user.
This commit is contained in:
parent
623f8c56bf
commit
0ff303efc2
|
|
@ -156,8 +156,10 @@ move_folder() {
|
|||
supervisor_group=$(id -gn $supervisor)
|
||||
# Change ownership
|
||||
chown -R $supervisor:$supervisor_group "$src"
|
||||
# Create dir
|
||||
# Create destination folder if needed
|
||||
mkdir -p "$dest"
|
||||
# Change ownership of destination (always done)
|
||||
chown $supervisor:$supervisor_group "$dest"
|
||||
# Move it
|
||||
mv "$src" "$dest"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue