# Add "disable rclone link" flag for remotes

**URL:** <https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586>\
**Category:** Feature\
**Created:** [January 13, 2022, 5:37pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586 "2022-01-13T17:37:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![clckwerk](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@clckwerk](https://forum.rclone.org/u/clckwerk)\
**Post date:** [January 13, 2022, 5:37pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/1 "2022-01-13T17:37:22Z")

</div>

[rclone\_link](https://rclone.org/commands/rclone_link/)  
Is there such a thing yet?

I'd imagine it would be disastrous if someone uses " **rclone link**" the root of a google drive.

Not to mention once the public linking is executed, google will scan your files and potentially delete files or flag them.

Similar to "read-only" for mounts, there should be a flag that blocks linking access per remote.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [January 14, 2022, 11:22am UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/2 "2022-01-14T11:22:59Z")

</div>

You can use the `--unlink` flag

```
 --unlink Remove existing public link to file/folder

```

It isn't supported by all backends though...

---

<div class="post-metadata">

**Author:** ![clckwerk](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@clckwerk](https://forum.rclone.org/u/clckwerk)\
**Post date:** [January 14, 2022, 11:40am UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/3 "2022-01-14T11:40:09Z")

</div>

Perhaps I didn't make my case clear enough, my bad.

My intention is to disable any link-making to even happen. A prevention of sorts, more examples to make it clearer:

1. --read-only prevent any changes to mounts

2. --dry-run prevent any changes

As you can see, there's basically no protection to prevent public link creation. This is a cause for concern for google drive as they basically turn on a swich whereby they start scanning your drives when it is publicly shared.

---

<div class="post-metadata">

**Author:** ![clckwerk](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@clckwerk](https://forum.rclone.org/u/clckwerk)\
**Post date:** [January 14, 2022, 11:43am UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/4 "2022-01-14T11:43:02Z")

</div>

Another words, disable "rclone link" functionality.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [January 14, 2022, 5:09pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/5 "2022-01-14T17:09:54Z")

</div>

If you pass in the flag `--disable PublicLink` then `rclone link` won't work.

You can also set this in an environment variable

```
RCLONE_DISABLE=PublicLink

```

Getting closer to what you want?

---

<div class="post-metadata">

**Author:** ![clckwerk](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@clckwerk](https://forum.rclone.org/u/clckwerk)\
**Post date:** [January 14, 2022, 5:27pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/6 "2022-01-14T17:27:09Z")

</div>

> [@ncw](#):
>
> RCLONE\_DISABLE=PublicLink

Thank you! This is exactly what I needed.

How is this not in the [flags](https://rclone.org/flags/) and [rclone\_link](https://rclone.org/commands/rclone_link/).

Or perhaps there's an environment variable wiki that I'm missing. Anyway, thanks!

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [January 14, 2022, 5:32pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/7 "2022-01-14T17:32:32Z")

</div>

It's not quite as clear as it probably could be as you have features for all the remotes and you can disable features for the remotes by the two ways @ncw described above.

```auto
rclone backend features GD:
{
	"Name": "GD",
	"Root": "",
	"String": "Google drive root ''",
	"Precision": 1000000,
	"Hashes": [
		"md5"
	],
	"Features": {
		"About": true,
		"BucketBased": false,
		"BucketBasedRootOK": false,
		"CanHaveEmptyDirectories": true,
		"CaseInsensitive": false,
		"ChangeNotify": true,
		"CleanUp": true,
		"Command": true,
		"Copy": true,
		"DirCacheFlush": true,
		"DirMove": true,
		"Disconnect": false,
		"DuplicateFiles": true,
		"GetTier": false,
		"IsLocal": false,
		"ListR": true,
		"MergeDirs": true,
		"Move": true,
		"OpenWriterAt": false,
		"PublicLink": true,
		"Purge": true,
		"PutStream": true,
		"PutUnchecked": true,
		"ReadMimeType": true,
		"ServerSideAcrossConfigs": false,
		"SetTier": false,
		"SetWrapper": false,
		"Shutdown": false,
		"SlowHash": false,
		"SlowModTime": false,
		"UnWrap": false,
		"UserInfo": false,
		"WrapFs": false,
		"WriteMimeType": true
	}
}

```

---

<div class="post-metadata">

**Author:** ![clckwerk](https://forum.rclone.org/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@clckwerk](https://forum.rclone.org/u/clckwerk)\
**Post date:** [January 14, 2022, 5:45pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/8 "2022-01-14T17:45:41Z")

</div>

TIL!  
I had no idea how to use this feature until now.

Apparently so since its hidden deep in [rc-command](https://rclone.org/rc/#backend/command).

Anyway good to know that this post will help others.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [March 15, 2022, 5:46pm UTC](https://forum.rclone.org/t/add-disable-rclone-link-flag-for-remotes/28586/9 "2022-03-15T17:46:18Z")

</div>

Closed on March 15, 2022, 5:46pm UTC

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