Give the new file the same ownership as the old file

(instead of having it always owned just by root)
This commit is contained in:
Andrew Scheller 2018-01-22 03:41:45 +00:00
parent 201db16c93
commit 3568798dd4
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ if [ -n "$2" ]; then
echo "ERROR: Could not copy file..."
exit -5
fi
old_owner=$(stat -c %u:%g "$1")
chown $old_owner "$2"
img="$2"
fi