[bug]: Image deletion cause Permission Denied when outdir is on another linux mount point
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
Linux
GPU
cuda
VRAM
10GB
What happened?
It's a typical linux box with two disks, one is for the system and home dir one is for the data. I put model dir and output dir on the data mount point. Create user dir and assign permission. Everything works fine, but when I try to delete an image, the backend reports a "Permission Denied" problem. It seems it tries to put the deleted image to a "trash" dir one level above the output dir. In my case, it is the "/mnt/output-disk/" dir. However, that dir is not owned by the current user. It should be something to do with the path calculation for the trashbin.
Can live with it, just comment out the send2trash part, but annoying.
Hope this helps.
Screenshots
Delete requested "outputs/000063.1777ae08.79647714.png" /mnt/output-disk/liyong3/000063.1777ae08.79647714.png b'/mnt/output-disk/.Trash-1002'
Traceback (most recent call last): File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/site-packages/send2trash/plat_other.py", line 156, in find_ext_volume_fallback_trash check_create(trash_dir) File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/site-packages/send2trash/plat_other.py", line 95, in check_create os.makedirs(dir, 0o700) File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: b'/mnt/output-disk/.Trash-1002'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/liyong3/invokeAI/backend/invoke_ai_web_server.py", line 700, in handle_delete_image send2trash(path) File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/site-packages/send2trash/plat_other.py", line 211, in send2trash dest_trash = find_ext_volume_trash(topdir) File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/site-packages/send2trash/plat_other.py", line 167, in find_ext_volume_trash trash_dir = find_ext_volume_fallback_trash(volume_root) File "/home/liyong3/invokeAI/installer_files/env/envs/invokeai/lib/python3.9/site-packages/send2trash/plat_other.py", line 159, in find_ext_volume_fallback_trash raise TrashPermissionError(e.filename) send2trash.exceptions.TrashPermissionError: [Errno 13] Permission denied: b'/mnt/output-disk/.Trash-1002'
Additional context
No response
Contact Details
No response