What is the problem you are having with rclone?
On a Drive remote, another user uploaded a file to a directory owned by me and shared with her.
Then, I use rclone delete
to try and delete that file, but rclone fails with insufficientFilePermissions errors.
I then open a browser on https://drive.google.com and browse to the directory, and use the "Remove" option on the 2nd mouse button menu to delete the file: it gets deleted with no further ado.
So it seems to me to be a bug in rclone.
Run the command 'rclone version' and share the full output of the command.
rclone v1.60.0
- os/version: ubuntu 18.04 (64 bit)
- os/kernel: 4.15.0-194-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.2
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google drive (directly, not over an encrypted/union/whatever remote).
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone delete --include="PREFIX*" drive_remote:dir1/dir2
The rclone config contents with secrets removed.
[dmgd]
type = drive
client_id = REDACTED
client_secret = REDACTED
token = REDACTED
root_folder_id = REDACTED
scope = drive
team_drive =
A log from the command with the -vv
flag
2022/11/12 15:18:13 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone" "-vv" "delete" "--include=PREFIX*" "drive_remote:dir1/dir2"]
2022/11/12 15:18:13 DEBUG : Creating backend with remote "drive_remote:dir1/dir2"
2022/11/12 15:18:13 DEBUG : Using config file from "/HOMEDIR/.rclone.conf"
2022/11/12 15:18:13 DEBUG : drive_remote: Loaded invalid token from config file - ignoring
2022/11/12 15:18:13 DEBUG : Saving config "token" in section "drive_remote" of the config file
2022/11/12 15:18:13 DEBUG : drive_remote: Saved new token in config file
2022/11/12 15:18:14 DEBUG : Waiting for deletions to finish
2022/11/12 15:18:16 DEBUG : SOME_OTHER_FILE.gpx: Excluded from sync (and deletion)
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:16 ERROR : PREFIX_FILE_TO_DELETE.gpx: Couldn't delete: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:16 ERROR : Attempt 1/3 failed with 2 errors and: failed to delete 1 files
2022/11/12 15:18:16 DEBUG : Waiting for deletions to finish
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:18 ERROR : PREFIX_FILE_TO_DELETE.gpx: Couldn't delete: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:18 ERROR : Attempt 2/3 failed with 2 errors and: failed to delete 1 files
2022/11/12 15:18:18 DEBUG : Waiting for deletions to finish
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:19 ERROR : PREFIX_FILE_TO_DELETE.gpx: Couldn't delete: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions
[... a ton of similar "Excluded from sync (and deletion)" lines ...]
2022/11/12 15:18:19 ERROR : Attempt 3/3 failed with 2 errors and: failed to delete 1 files
2022/11/12 15:18:19 DEBUG : 8 go routines active
2022/11/12 15:18:19 Failed to delete with 2 errors: last error was: failed to delete 1 files
Further comments and details
-
The user uploaded the file using the Drive app installed in her Android phone.
-
The issue is 100% reproducible here.
-
The issue also happens with rclone version 1.59.0.
Please let me know if anything else is needed.
I searched to see if this was a known bug at Issues · rclone/rclone · GitHub, but there was nothing quite like it -- please let me know if an issue should be opened and I will do it.
Thanks in advance,
-- Durval.