diff --git a/.docker/Dockerfile b/.docker/Dockerfile
index 975eae8f22ff68e358edff4e36edc9046b3b3d36..9c03b2d97a56b0c6927e1f1f52f571beea52e54b 100644
--- a/.docker/Dockerfile
+++ b/.docker/Dockerfile
@@ -24,6 +24,7 @@ RUN rm -r /git/.git
 # Install pylinkahead.ini for the tests
 RUN mv /git/.docker/tester_pylinkahead.ini /git/pylinkahead.ini
 
+RUN useradd user
 
 WORKDIR /git
 # wait for server,
@@ -34,5 +35,9 @@ CMD /wait-for-it.sh caosdb-server:10443 -t 500 -- \
     # ... put out general version information
     python3 --version && \
     python3 -c "import linkahead; print(linkahead.version.version)" && \
+    chown -R user /authtoken && \
+    mkdir -p /extroot && \
+    chown -R user /extroot && \
+    chown -R user /git && \
     # ... and run tests
-    pytest --cov=linkahead -vv tests
+    su user -c "pytest --cov=linkahead -vv tests"
diff --git a/tests/test_tickets.py b/tests/test_tickets.py
index e9481d52e882fa222b592c08cfc3f79181b8681b..c535ed7bfa3e8c04553fc80eb1ee46b7bfe06162 100644
--- a/tests/test_tickets.py
+++ b/tests/test_tickets.py
@@ -471,7 +471,6 @@ def test_ticket_137():
 
 
 # Test remodeled after removal of dropoffbox.
-@pytest.mark.xfail(reason="Fails if running as root.")
 def test_ticket_39(tmp_path):
     """Testing file upload of unreadable files."""
     import os