Skip to content

Failing to move files across filesystem boundaries [in a docker instance] #108

@perllaghu

Description

@perllaghu

Situation:

  • jupyterlab server running as a docker container [in a cluster]
  • filesystem content is mounted from an external NFS server:
    • /home/joyan ($HOME) is the users home directory
    • /home/joyvan/shared-data is mounted in top of that

I can happily "delete" files from $HOME, and any sub-directory within that mount

"Deleting" /home/joyvan/shared-data/untitled.txt, however, throws the following error:

[W 2026-01-28 10:05:10.703 ServerApp] delete /shared-data/untitled.txt
[ServerApp | WARNING] delete /shared-data/untitled.txt
[W 2026-01-28 10:05:10.737 ServerApp] wrote error: "send2trash failed: [Errno 13] Permission denied: ''"
    Traceback (most recent call last):
[ServerApp | WARNING] wrote error: "send2trash failed: [Errno 13] Permission denied: ''"
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.13/site-packages/send2trash/plat_gio.py", line 17, in send2trash
        f.trash(cancellable=None)
      File "/opt/conda/lib/python3.13/site-packages/send2trash/plat_gio.py", line 17, in send2trash
        f.trash(cancellable=None)
        ~~~~~~~^^^^^^^^^^^^^^^^^^
    gi.repository.GLib.GError: g-io-error-quark: Unable to trash file /home/jovyan/shared-data/untitled.txt across filesystem boundaries (15)
        ~~~~~~~^^^^^^^^^^^^^^^^^^
    gi.repository.GLib.GError: g-io-error-quark: Unable to trash file /home/jovyan/shared-data/untitled.txt across filesystem boundaries (15)

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py", line 1032, in delete_file
        send2trash(os_path)
        ~~~~~~~~~~^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/send2trash/plat_gio.py", line 22, in send2trash
        raise TrashPermissionError("") from e
    send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: ''

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.13/site-packages/tornado/web.py", line 1859, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/auth/decorator.py", line 73, in inner
        return await out
               ^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/handlers.py", line 336, in delete
        await ensure_async(cm.delete(path))
      File "/opt/conda/lib/python3.13/site-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async
        result = await obj
                 ^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py", line 898, in delete
        await self.delete_file(path)
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py", line 1034, in delete_file
        raise web.HTTPError(400, "send2trash failed: %s" % e) from e
    tornado.web.HTTPError: HTTP 400: Bad Request (send2trash failed: [Errno 13] Permission denied: '')

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py", line 1032, in delete_file
        send2trash(os_path)
        ~~~~~~~~~~^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/send2trash/plat_gio.py", line 22, in send2trash
        raise TrashPermissionError("") from e
    send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: ''

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.13/site-packages/tornado/web.py", line 1859, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/auth/decorator.py", line 73, in inner
        return await out
               ^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/handlers.py", line 336, in delete
        await ensure_async(cm.delete(path))
      File "/opt/conda/lib/python3.13/site-packages/jupyter_core/utils/__init__.py", line 214, in ensure_async
        result = await obj
                 ^^^^^^^^^
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/manager.py", line 898, in delete
        await self.delete_file(path)
      File "/opt/conda/lib/python3.13/site-packages/jupyter_server/services/contents/filemanager.py", line 1034, in delete_file
        raise web.HTTPError(400, "send2trash failed: %s" % e) from e
    tornado.web.HTTPError: HTTP 400: Bad Request (send2trash failed: [Errno 13] Permission denied: '')
[ServerApp | WARNING] 400 DELETE /<path>/api/contents/shared-data/untitled.txt?1769594710684 (f62f69fde70242e9bdf565f3fd771a67@129.215.128.191) 42.82ms referer=https://<server>/<path>/lab/tree/shared-data     

I'm guessing that try/except in plat_other.py isn't recognising this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions