diff --git a/tests/test_webservice.py b/tests/test_webservice.py
index 74d9d8e0b1d42bebe838355c95b76cd146ff5977..30c3606cd79cf7896364b297eedc6c68d31161d0 100644
--- a/tests/test_webservice.py
+++ b/tests/test_webservice.py
@@ -1,3 +1,5 @@
+import os
+
 import datetime as dt
 import logging
 import sys
@@ -62,6 +64,9 @@ def test_check_files(tmp_path):
     runs = [1, 2]
     assert not check_files(in_folder, runs, karabo_das)
 
+    if os.getuid() == 0:
+        return  # root can bypass access permissions, so the test below doesn't work
+
     noaccess = tmp_path / "noaccess"
     noaccess.mkdir(mode=0o000)  # make a directory we can't read
     with pytest.raises(PermissionError):