summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/removable_storage_test5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/removable_storage_test b/bin/removable_storage_test
index bbace30..67c92fd 100755
--- a/bin/removable_storage_test
+++ b/bin/removable_storage_test
@@ -617,6 +617,11 @@ def main():
test = DiskTest(args.device, args.memorycard, args.lsblkcommand)
+ # LP:1876966
+ if os.getuid() != 0:
+ print("ERROR: This script must be run as root!")
+ return 1
+
errors = 0
# If we do have removable drives attached and mounted
if len(test.rem_disks) > 0 or len(test.rem_disks_nm) > 0: