Rclone link command to Gdrive says insufficient permission

What is the problem you are having with rclone?

I am unable to generate the public shared link for Google Drive file. I use Google apps and have admin access. I have also created my own client id using OAuth 2.0 Client IDs but not a service account

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Mac Catalina
Unraid

Rclone link gdrive:folder/1.docx

Failed to link : google Api error 403 The user does not have sufficient permission for the file is, insufficientfilepermission

I note this in the source code

                // TODO: On TeamDrives this might fail if lacking permissions to change ACLs.
                // Need to either check `canShare` attribute on the object or see if a sufficient permission is already present.

Is this a team drive? Do you have permissions to change ACLs?

Hi,
This is not a team drive. I'm the admin and have all the permissions.

It really seems you don't have the right permissions.

What version are you running?
Can you share a debug log of the command?

Thanks for the reply.
It is I who's uploaded the file via rclone. I've also enabled a service account now with domain wise delegation access.

2020/07/22 18:51:17 DEBUG : rclone: Version "v1.52.1" starting with parameters ["rclone" "link" "gdrive:1.docx" "--log-file=/Users/mABCCCC/Desktop/All Data/1.txt" "--log-level" "DEBUG"]
2020/07/22 18:51:17 DEBUG : Using config file from "/Users/mABCCCC/.config/rclone/rclone.conf"
2020/07/22 18:51:19 DEBUG : Google drive root '1.docx': attempting to share directory ''
2020/07/22 18:51:23 DEBUG : 8 go routines active
2020/07/22 18:51:23 Failed to link: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

Yeah, the service account is still missing permissions though as you might need to reauthenticate.

If it's not a team drive, you can also just use your user account as that would work fine.

What's the reason for a service account?

I created it just an hour back , I thought it might help. I was getting the same error even without it.

Even after just removing service account & reauthenticating I get same error

failed to link: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

You'd still have something going on via permissions albeit I'm not sure what else to check as if you are using a user that owns the account, it does work without issue.

textere@seraphim ~ % rclone copy /etc/hosts GD:
textere@seraphim ~ % rclone link GD:hosts -vv
2020/07/22 10:45:40 DEBUG : rclone: Version "v1.52.0" starting with parameters ["rclone" "link" "GD:hosts" "-vv"]
2020/07/22 10:45:40 DEBUG : Using config file from "/Users/textere/Documents/rclone.conf"
2020/07/22 10:45:40 DEBUG : fs cache: renaming cache item "GD:hosts" to be canonical "GD:"
2020/07/22 10:45:40 DEBUG : Google drive root '': attempting to share single file 'hosts'
https://drive.google.com/open?id=1X4dQHmKtM3vMhGwQxSVYbcZnyaidH4J_
2020/07/22 10:45:41 DEBUG : 6 go routines active
textere@seraphim ~ % rclone delete GD:hosts
textere@seraphim ~ %

HI,
I've now tried setting up another rclone configuration on another domain where I"m owner.

When I transfer the file

rclone copy /Users/prashantm/Downloads/sbi.pdf pdrive:pop -vv
2020/07/22 22:42:03 DEBUG : rclone: Version "v1.52.2" starting with parameters ["rclone" "copy" "/Users/prashantm/Downloads/sbi.pdf" "pdrive:pop" "-vv"]
2020/07/22 22:42:03 DEBUG : Using config file from "/Users/prashantm/.config/rclone/rclone.conf"
2020/07/22 22:42:03 DEBUG : fs cache: renaming cache item "/Users/prashantm/Downloads/sbi.pdf" to be canonical "/Users/prashantm/Downloads"
2020/07/22 22:42:05 DEBUG : sbi.pdf: Need to transfer - File not found at Destination
2020/07/22 22:42:09 DEBUG : sbi.pdf: MD5 = c73c553381260a78a027e99a2ad55e5f OK
2020/07/22 22:42:09 INFO : sbi.pdf: Copied (new)
2020/07/22 22:42:09 INFO :
Transferred: 68.938k / 68.938 kBytes, 100%, 18.106 kBytes/s, ETA 0s
Transferred: 1 / 1, 100%
Elapsed time: 3.8s

rclone copy /Users/prashantm/Downloads/sbi.pdf pdrive:pop -vv

2020/07/22 22:43:06 DEBUG : Using config file from "/Users/prashantm/.config/rclone/rclone.conf"
2020/07/22 22:43:09 DEBUG : fs cache: renaming cache item "pdrive:pop/sbi.pdf" to be canonical "pdrive:pop"
2020/07/22 22:43:10 DEBUG : Google drive root 'pop': attempting to share single file 'sbi.pdf'
2020/07/22 22:43:11 DEBUG : 6 go routines active
2020/07/22 22:43:11 Failed to link: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

Can you walk through how you are setting up your rclone.conf and what user are you using?

I'm testing in a GSuite Domain with a user account to that same user's GDrive.

I am not sure what. you mean by you are admin on the domain.

What I mean is I've tested on two different Google Apps domains where I'm the admin.

  • Should I post my rclone.conf here??
  • I'm using the same admin account itself to setup rclone.conf

So in GSuite, you created a user and that user has a drive, we can call it UserA.

UserA is using Google drive.
In rclone.conf UserA is confiugred and authenticated to rclone.

Or are you saying, you have "admin" and "admin" is using connecting to UserA's Google Drive.

In Gsuite, I'm the admin with account UserAdmin

UserAdmin is using Google Drive
rclone.conf Useradmin account is configured & authenticated to rclone.

and in the GUI, you can go in and create a shareable link?

That works?

YES I'm able to

And that's the same user logged in as you are using with rclone?

If so, that should work. If not, you got something else going on and you may want to check with their support and see why you have a permissions issue.

Yes, it's the same user. I will contact support as well.

Does LINK work with Team Drive as well?

Sure, links work with either.

Permissions on team drives (in theory) are more annoying than a normal user, but you seem to having an issue with the regular user as well.

If you do hear something back, I'd love to know what it was.

I've lodged one but I've got the standard, this being an unsupported app we cannot do much but we will ask our local partners to look into this.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.