Overriding delete operation inside a mounted directory as moving operation
0
votes
0
answers
63
views
Suppose a mounted directory
/mnt/rclone
. The problem is I have insufficient permission to perform, e.g.
rm -rf /mnt/rclone/file.txt
Outputting:
rm: cannot remove '/mnt/rclone/file.txt': Input/output error
It seems like a generic error, but I know the cause. It's because I don't have permission to perform delete operations. Not only remove operations, but also modification operations. So, when using nano
or vim
, I still get such an error.
Note that I'm allowed to perform move or copy operations!
So, I expect there is such a wrapper that wraps /mnt/rclone
to /mnt/rclone_wrapper
. So when I perform a command like modifying the text in nano /mnt/rclone_wrapper/file.txt
, behind the scenes it works like this:
1. Copying /mnt/rclone/file.txt
to local (e.g., /tmp/file.txt
)
2. Moving /mnt/rclone/file.txt
to /mnt/rclone/.trash/
3. Moving /tmp/file.txt
to /mnt/rclone/file.txt
Is there any idea somehow?
---
Clarification:
1. I use FUSE
since rclone uses it.
2. I mounted it to a remote (Google Drive).
3. Note that I have root access. The permission issue comes from the remote, which is Google Drive.
Asked by Muhammad Ikhwan Perwira
(319 rep)
Jun 9, 2025, 06:31 PM
Last activity: Jun 10, 2025, 11:36 AM
Last activity: Jun 10, 2025, 11:36 AM