STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.
What is the problem you are having with rclone?
I'm trying to "delete" (mask/hide) a file that is on a read-only Google Drive backend that is also using union with SMB backend that is read/write. I know it is not possible to actually delete a file on a read-only filesystem, thus I'm really looking to mask or hide the file from the directory structure that union creates.
It seems that @raymond-h asked a similar question back in 2020 about this functionality but didn't get a response or comment that was related to additional functionality similar to "unionfs whiteout," or I am misinterpreting what was being stated/asked for:
Is there a known way to configure rclone that I'm simply overlooking that would emulate this functionality? Or perhaps a more obvious solution to what I'm trying to do here, even if it isn't rclone functionality specific?
Run the command 'rclone version' and share the full output of the command.
rclone v1.64.2
- os/version: centos 7.9.2009 (64 bit)
- os/kernel: 6.4.11-1.el7.elrepo.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.3
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
# mount | grep media
union_media: on /mnt/media type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
# rm -rf /mnt/media/TV/Show\ Name/Season\ 01/Old\ File\ To\ Delete.mkv
rm: cannot remove ‘/mnt/media/TV/Show Name/Season 01/Old File To Delete.mkv’: Operation not permitted
# rclone delete union_media:TV/Show\ Name/Season\ 01/Old\ File\ To\ Delete.mkv
2023/10/21 22:59:05 ERROR : Old File To Delete.mkv: Couldn't delete: permission denied
2023/10/21 22:59:05 ERROR : Attempt 1/3 failed with 2 errors and: failed to delete 1 files
2023/10/21 22:59:06 ERROR : Old File To Delete.mkv: Couldn't delete: permission denied
2023/10/21 22:59:06 ERROR : Attempt 2/3 failed with 2 errors and: failed to delete 1 files
2023/10/21 22:59:06 ERROR : Old File To Delete.mkv: Couldn't delete: permission denied
2023/10/21 22:59:06 ERROR : Attempt 3/3 failed with 2 errors and: failed to delete 1 files
2023/10/21 22:59:06 Failed to delete with 2 errors: last error was: failed to delete 1 files
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[encrypted_media]
type = alias
remote = gdrive_media:
[gdrive_base]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
[gdrive_media]
type = crypt
remote = gdrive_base:Media
filename_encryption = standard
directory_name_encryption = true
password = XXX
password2 = XXX
[google_photos]
type = google photos
read_only = true
token = XXX
[qnap1_base]
type = smb
host = XXX
user = XXX
pass = XXX
[qnap1_media]
type = alias
remote = qnap1_base:Media
[union_media]
type = union
upstreams = gdrive_media:/:ro qnap1_media:/
A log from the command that you were trying to run with the -vv
flag
2023/10/21 23:04:16 DEBUG : /: Lookup: name="TV"
2023/10/21 23:04:16 DEBUG : /: >Lookup: node=TV/, err=<nil>
2023/10/21 23:04:16 DEBUG : TV/: Attr:
2023/10/21 23:04:16 DEBUG : TV/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/10/21 23:04:16 DEBUG : TV/: Lookup: name="Show Name"
2023/10/21 23:04:19 DEBUG : TV/: >Lookup: node=TV/Show Name/, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/: Attr:
2023/10/21 23:04:19 DEBUG : TV/Show Name/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/: Lookup: name="Season 01"
2023/10/21 23:04:19 DEBUG : TV/Show Name/: >Lookup: node=TV/Show Name/Season 01/, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: Attr:
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: Lookup: name="Old File To Delete.mkv"
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: >Lookup: node=TV/Show Name/Season 01/Old File To Delete.mkv, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/Old File To Delete.mkv: Attr:
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/Old File To Delete.mkv: >Attr: a=valid=1s ino=0 size=1234567890 mode=-rw-rw-r--, err=<nil>
2023/10/21 23:04:19 DEBUG : /: Lookup: name="TV"
2023/10/21 23:04:19 DEBUG : /: >Lookup: node=TV/, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/: Attr:
2023/10/21 23:04:19 DEBUG : TV/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: Remove: name="Old File To Delete.mkv"
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/Old File To Delete.mkv: Remove:
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/Old File To Delete.mkv: File.Remove file error: permission denied
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/Old File To Delete.mkv: >Remove: err=permission denied
2023/10/21 23:04:19 DEBUG : TV/Show Name/Season 01/: >Remove: err=operation not permitted