https://prefect.io logo
Title
i

Idan

01/10/2023, 3:21 PM
We run into a weird edge case and I'm wondering what would be the Prefect way around this 🙂 We have a mounted drive where only legitimate users can write to, so in one flow, one task calls
os.seteuid(priv_user_id)
(and then later resets to
original_user_id
). This is run in a container, so the
original_user_id
is
root
, which entails
PREFECT_HOME
is
/root/.prefect/
. Our tasks are long-running, so we also cache them. Then, every now and then, a task succeeds, but fails with:
Crash detected! Execution was interrupted by an unexpected exception: Traceback (most recent call last):
  File "/usr/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/root/.prefect/storage'

During handling of the above exception, another exception occurred:

PermissionError: [Errno 13] Permission denied: '/root/.prefect/storage'
Any smart ideas how to facilitate both needs?