Provide Drive Shortcut Link of Actual File/Folder

Whenever I run :

rclone link Shared_Drive:xxxxxx.xxx
(where "xxxxxx.xxx" is a Google Drive File Shortcut)

The rclone spits out an error, it will be really useful if it can find the path of actual file/folder and provide us with a sharable link of that.

Can you try the latest beta?

That seemed to work for me.

2020/08/17 17:55:29 DEBUG : rclone: Version "v1.52.3-307-g29d6358f-beta" starting with parameters ["rclone" "link" "iamAnshMittal:Video.mkv" "-vvv"]
2020/08/17 17:55:29 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2020/08/17 17:55:29 DEBUG : Google drive root 'Video.mkv': root_folder_id = "0ABAdsJ7C80n6Uk9PVA" - save this in the config to speed up startup
2020/08/17 17:55:31 DEBUG : fs cache: adding new entry for parent of "iamAnshMittal:Video.mkv", "iamAnshMittal:"
2020/08/17 17:55:32 DEBUG : Google drive root '': attempting to share single file 'Video.mkv'
2020/08/17 17:55:34 DEBUG : 4 go routines active
2020/08/17 17:55:34 Failed to link: googleapi: Error 403: The user does not have sufficient permissions for this file., insufficientFilePermissions

The Actual File Location : /Video/Video.mkv
Shortcut Location : /Video.mkv

All the files are in my 15GB Drive Itself so no chances of any permission error.

You might not have share permissions for the file though - those are separate.

Does rclone link work if you point it at the actual file?

Can you run

rclone link iamAnshMittal:Video.mkv -vv --dump bodies

And post the result please?

Well, Both the Actual File and Shortcut File are in My Drive itself and the remote is authenticated with the same account.

rclone version : rclone/v1.52.3-307-g29d6358f-beta (amd64)

rclone ls 'iamAnshMittal:Shortcut Link Test'

3824590545 Actual File/Video.mkv
3824590545 Shortcut File/Video.mkv

rclone link 'iamAnshMittal:Shortcut Link Test/Actual File/Video.mkv'

LINK IS SHOWN ( No Permission to Post Link )

!rclone link 'iamAnshMittal:Shortcut Link Test/Shortcut File/Video.mkv' --dump bodies -vv

https:// pastebin com / kdgXt39f

Link : pastebin.com/kdgXt39f

Looking at your dump, rclone is trying to share a link to the shortcut (as requested).

This appears to be the problem - I don't know why.

When I try sharing a link to a shortcut it works fine so this may be something to do with it being a teamdrive or a cross teamdrive shortcut.

Rclone appears to be doing everything correctly so I think this is either a google problem or a problem with your setup.

I tried this on a teamdrive I have access to and I got this error instead

{"error":{"errors":[{"domain":"global","reason":"internalError","message":"Internal Error"}],"code":500,"message":"Internal Error"}}

Which might be leaning towards a google problem...

Okay, So for the time being I will stick to the original files.

Or Maybe you could merge this PR, And I can star the files I want to generate the shareable url for.

It is being updated to latest rclone repo and has been working perfectly as expected.

I just merged the PR :slight_smile: