-echo "Testing appending directory containing unreadable file (should generate errors)"
-mkdir -p dir3
-touch dir3/file
-chmod -r dir3/file
-if imagex append dir3 dir.wim; then
- error "Incorrectly succeeded in capturing directory with unreadable file"
+if [ `id -u` != 0 ]; then
+ echo "Testing appending directory containing unreadable file (should generate errors)"
+ mkdir -p dir3
+ echo 1 > dir3/file
+ chmod -r dir3/file
+ if imagex append dir3 dir.wim; then
+ error "Incorrectly succeeded in capturing directory with unreadable file"
+ fi