cloud sync task with pre-script failed: [Errno 13] Permission denied: '/tmp/tmpfvz99d0_'


Apr 5, 2024
i have created a cloud sync task long time ago and its work fine untill i upgrade to dragonfish.

the task is copy files and pack them up, then upload to a webdav server, this is my configuration:


its seems like failed to read pre-script tmp file?

[Errno 13] Permission denied: '/tmp/tmpfvz99d0_'

Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/", line 469, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/", line 511, in __run_body
    rv = await self.method(*args)
  File "/usr/lib/python3/dist-packages/middlewared/schema/", line 187, in nf
    return await func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/", line 1047, in sync
    await self._sync(cloud_sync, options, job)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/", line 1093, in _sync
    await rclone(self.middleware, job, cloud_sync, options["dry_run"])
  File "/usr/lib/python3/dist-packages/middlewared/plugins/", line 213, in rclone
    await run_script(job, env, cloud_sync["pre_script"], "Pre-script")
  File "/usr/lib/python3/dist-packages/middlewared/plugins/", line 284, in run_script
    proc = await Popen(
  File "/usr/lib/python3.11/asyncio/", line 218, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "/usr/lib/python3.11/asyncio/", line 1694, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "/usr/lib/python3.11/asyncio/", line 207, in _make_subprocess_transport
    transp = _UnixSubprocessTransport(self, protocol, args, shell,
  File "/usr/lib/python3.11/asyncio/", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "/usr/lib/python3.11/asyncio/", line 810, in _start
    self._proc = subprocess.Popen(
  File "/usr/lib/python3.11/", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/tmp/tmpfvz99d0_'

then i try to delete pre-script and post-script, and it works fine again!
but i realy need pre-script and post-script to pack files automatic XD