From 98edda668fdf79e2f69ad23f62d384ddaad2dff3 Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Sun, 29 May 2016 23:46:16 +0200 Subject: [PATCH] fixed bug in stat and chown resetting at least chmod 2XXX. --- vmsnap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmsnap.sh b/vmsnap.sh index a29b766..de38e35 100755 --- a/vmsnap.sh +++ b/vmsnap.sh @@ -32,7 +32,7 @@ if [ ! -d ".git" ]; then fi echo "storing file owner + permissions..." -find root -not -type l -print0 | sort -z | xargs -0 -n1 stat -c "chmod %a \"%n\"; chown %u:%g \"%n\"" > setPerms.sh +find root -not -type l -print0 | sort -z | xargs -0 -n1 stat --printf="chown %u:%g\t\"%n\"; chmod %a \"%n\"\n" > setPerms.sh echo "storing filesystem into git..." git add setPerms.sh root -- 2.43.0