From fcfc1c498d32625c103b27ae6410a24ff0486788 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Thu, 24 Mar 2011 16:57:43 +0100 Subject: [PATCH] Change permissions on Dispvm template files only if we are root Otherwise, it makes no sense, and thus we do not unnecessarily warn. --- dom0/restore/qvm-create-default-dvm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dom0/restore/qvm-create-default-dvm b/dom0/restore/qvm-create-default-dvm index 70ceb8e7..c854c837 100755 --- a/dom0/restore/qvm-create-default-dvm +++ b/dom0/restore/qvm-create-default-dvm @@ -57,6 +57,9 @@ else ln -s $SHMCOPY $CURRENT fi -chgrp qubes "$DVMTMPLDIR" "$DVMTMPLDIR"/* -chmod 660 "$DVMTMPLDIR"/* -chmod 770 "$DVMTMPLDIR" +if [ $(whoami) = "root" ] ; then + chgrp qubes "$DVMTMPLDIR" "$DVMTMPLDIR"/* + chmod 660 "$DVMTMPLDIR"/* + chmod 770 "$DVMTMPLDIR" +fi +