Remove duplicate definition
Fix test when run as root

Root user cannot easily be prevented from accessing a no-access file so don't run the test if run as root