Patronum Logo
00%
Patronum Logo
menu-icon

How to Remove “Anyone with the Link” Sharing in Google Drive

By Patronum

July 15, 2025

Read Time: 8 mins

It was meant to be simple. A proposal to a client. A pitch deck to a collaborator. A spreadsheet shared with a friend of a colleague. No login hurdles. Just a link. And so, with a single click, you enabled “Anyone with the link can view.”

What seemed like convenience was, in fact, a blindfolded invitation to the world. No password. No approval. Just a live, open window into your files that are quietly indexed, forwarded, or exposed by accident.

In an era where file sharing has become frictionless, so has the risk of unintended access. Startups leak prototypes. Teachers mis-share student data. Enterprises circulate confidential roadmaps through links that never die.

And unless you act, that door remains open.

This guide isn’t just another how-to. It’s a deep forensic sweep, a strategic blueprint to identify, revoke, and permanently remove “Anyone with the link” access from every crevice of your Google Drive. Because convenience without control is just another word for compromise.

No hacking tools. No brute-force attacks. Just a forwarded link.

That’s all it takes for your internal Google Drive files to become a public exhibition. From legal contracts to raw customer data, thousands of organizations unknowingly expose sensitive documents every year, thanks to the well-meaning but perilous setting known as “Anyone with the link”!

Here’s the catch: Google Drive doesn’t notify you when a link gets reshared. Nor does it warn you if that link lands in a public Slack channel or a forgotten Trello card. Once “general access” is enabled, your document is accessible to anyone who stumbles upon the URL, bots included.

Security audits across industries have shown that “link-sharing risks” are among the top three non-malicious causes of data exposure. In 2023, one tech firm leaked six months’ worth of R&D strategy through a shared design folder which was publicly indexed for over a month.The point isn’t paranoia. It’s protocol. Every “Anyone with the link” file is a silent liability. You can’t fix what you don’t audit.

To revoke exposure, you must first understand the architecture of sharing.

Google Drive offers three core access levels under the “General Access” setting:

  • Restricted – only explicitly invited users can view
  • Anyone with the link – no sign-in required
  • Anyone in [your domain] with the link – semi-public within your organization
blog image 1

Here’s the problem: the default can shift subtly, especially in collaborative environments. If your last share used “Anyone with the link,” Google often remembers it and suggests it by default the next time around. One careless click, and visibility spirals out again.

Even worse, folders inherit and cascade permissions. Sharing a single file inside a parent folder already set to public? It’s public too, unless you manually override.

Understanding these tiers isn’t optional. It’s fundamental. Think of them as security gates. When misused, they don’t just fail to protect; they broadcast your assets to the wild.Whether you’re managing a personal Drive or enforcing policy across a Workspace domain, reclaiming control begins with learning how Drive thinks, and how to retrain it.

Now that the danger is clear and the permission hierarchy understood, we arrive at the operational phase: removing “Anyone with the link” access from your Google Drive files.

The bad news? Google doesn’t offer a single-click solution to revoke public link access across your entire Drive. The good news? You have several tactical approaches, each suited to different use cases, from isolated files to organizational domains.

What follows isn’t just a list of actions. It’s a progressive scale – from manual cleanup to administrative overhauls to programmatic tools used by IT professionals. Whether you’re a solo creator, a team lead, or a Google Workspace admin, there’s a method here that fits your scope.

Manual File-By-File Revocation

This is the method most users start with and often the only one they know. To revoke “Anyone with the link” from an individual file or folder:

  1. Right-click the file in Drive
  2. Select “Share”
  3. In the dialog box, under “General Access,” you’ll see if it’s set to “Anyone with the link”
  4. Click the dropdown and change it to “Restricted”

The file is now locked down. Only directly invited users retain access.

This method is straightforward but grueling at scale. If you’re managing dozens or hundreds of files, especially across subfolders, the burden quickly becomes unsustainable. Worse, it requires you to know which files have been shared publicly, a task Google doesn’t make easy. Still, there’s value here. For high-sensitivity documents, manual review ensures control. You can verify collaborators, adjust edit/view privileges, and tighten the ship.

But let’s be honest. This isn’t a strategy. It’s triage. And while triage can save a life, it doesn’t cure the condition.

Batch-Select Method in Drive Web UI

Google Drive’s web interface allows you to select multiple files and modify permissions in bulk, which is an underused but surprisingly powerful capability.

To do this:

  1. Open your Google Drive
    • Hold Ctrl (or Cmd on Mac) and click multiple files, or use Shift for a range
  2. Right-click one of the highlighted files
  3. Select “Share”
  4. Under “General Access,” change from “Anyone with the link” to “Restricted”

The change applies to all selected files by instantly revoking public access.

But there’s a catch: you must know which files were previously shared publicly. Google doesn’t offer a native filter for “Anyone with the link.” Unless you’ve labeled or starred them, you’re clicking in the dark. This method shines in controlled environments: project folders, recent uploads, or curated directories where visibility is known. It’s faster than file-by-file cleanup and more efficient for teams.

Still, it’s reactive, not proactive. You’re fixing exposure after the fact, not preventing it.

Workspace Admin Console – Domain-Wide Lockdown

Sometimes, precision must give way to power.

If you’re a Google Workspace administrator, the most effective way to shut the door on link-sharing risk is from the top, by disabling it at the domain level. This is not just tactical. It’s strategic policy enforcement.

Here’s how:

  1. Go to admin.google.com
  2. Navigate to Apps > Google Workspace > Drive and Docs > Sharing settings
  3. Under Link Sharing, disable “Anyone with the link” options
  4. Save changes to apply across your organization

This move halts the creation of new public links instantly. But here’s the fine print: it does not retroactively revoke access from files already shared. However, it sends a signal of a top-down cultural shift. The convenience era is over. The era of control has begun.

Combine this with regular admin audits and DLP (Data Loss Prevention) alerts, and you’ve transformed a reactive posture into a secure default.

Google Drive for Desktop + Mirror Mode Trick

In a Reddit thread that gained quiet traction among IT professionals, a clever method emerged: use Google Drive for Desktop, set it to Mirror mode, and re-upload selectively.

Here’s how it works:

  1. Install Google Drive for Desktop and enable Mirror mode
  2. On your system, move files out of the shared folder
  3. Delete the original cloud-hosted folder from Drive
  4. Re-upload files into a new folder with stricter permissions this time

Why it matters: when you delete the original shared folder, all existing public links die with it. When you re-upload, you control the access from scratch. It’s an elegant workaround, especially for cases where bulk revocation isn’t possible due to lack of visibility or third-party tool access.

Think of it as a “permission reset” button. One that doesn’t require scripting or admin privilege—just a clean slate and a better security habit.

Programmatic Revocation via Apps Script

What if you could scan your entire Google Drive, identify every publicly shared file, and automatically revoke access—all in one swoop?

Enter Google Apps Script: a lightweight scripting platform that runs directly in Google Workspace.

Here’s a conceptual outline of what your script would do:

  1. Iterate through all files in your Drive
  2. Check each file’s sharing settings
  3. If access = “Anyone with the link”, then change to “Restricted”
  4. Log filenames for audit trail

A sample snippet may look like:

function unshareFiles() {
var files = DriveApp.getFiles();
while (files.hasNext()) {
var file = files.next();
var editors = file.getEditors();
var viewers = file.getViewers();
file.setSharing(DriveApp.Access.PRIVATE, DriveApp.Permission.NONE);
}}

This isn’t for the faint-hearted. You’ll need some scripting comfort and admin rights. But the power is immense. Its automation meets audit control.

For midsize organizations managing hundreds or thousands of files, this script becomes a weapon of compliance—ensuring every document conforms to internal access policies without endless clicks.

Patronum and Third-Party Tools

When Google doesn’t give you the button you need, someone else usually builds it.

Enter Patronum – a comprehensive Google Workspace management platform designed for IT admins and security teams. Its standout feature? A streamlined toolset to audit and revoke “Anyone with the link” sharing at scale.

Here’s how it works:

  1. Sign into Patronum with admin privileges
  2. Use its Drive audit panel to surface files with public link access
  3. Select items and enforce organization-wide sharing policies
  4. Automatically convert them to “Restricted” in bulk

Unlike Google Drive’s native UI, Patronum provides visibility and enforceability. You don’t guess which files are exposed. You know. You don’t react, you enforce!

Whether it’s recurring scans, compliance reporting, or active cleanup, it turns chaos into governance. For IT teams overseeing vast domains or those lacking script-writing muscle, Patronum becomes the command center. Visible. Scalable. Defensible.

Revoking “Anyone with the link” might feel like flipping off a light switch. But what actually happens under the hood? The moment you change a file’s general access from public to Restricted, the following takes place:

  • The URL still exists, but it becomes useless to anyone who’s not explicitly invited
  • Google stops rendering the preview to non-authorized users
  • If someone tries to access it, they’re met with “You need permission”
  • Search engines, if they’d indexed the file, lose visibility

Critically, revocation is immediate. You don’t need to wait for cache resets or propagation. However, it’s only as thorough as your review process. If one file escapes your audit, the exposure continues.

In team settings, it’s wise to send a brief alert after mass revocation. Some collaborators might lose access unintentionally. That’s okay. Security first. Access can be rebuilt. Leaks cannot.

Fixing is good. Preventing is smarter. To avoid future slip-ups, you need systems, not just intentions. Here’s how to harden your file-sharing discipline:

  1. Default to “Restricted”
    Reset your sharing behavior. Google remembers your last choice. Make sure “Restricted” is the first reflex.
  2. Train your team
    15 minutes of training can prevent 15 lawsuits. Educate collaborators on the difference between public and private access.
  3. Use folder-level permissions
    Structure your Drive for control—so access inheritance works for you, not against you.
  4. Schedule audits
    Use search operators like owner:me to:public to surface risks quarterly.
  5. Formalize a rule
    Prohibit “Anyone with the link” sharing without management sign-off. Accountability reduces accidents.
blog image 3

Security is a behavior, not just a setting. Build it into your workflow.

Security Is a Setting – But Also a Standard!

Google Drive gave us convenience. But with it came complacency.

“Anyone with the link” isn’t just a feature. It’s a gamble—one that far too many individuals and teams make without realizing the odds. Removing public link access isn’t just damage control. It’s digital hygiene. A statement that what’s confidential should stay confidential. That your files, your work, your data deserve more than default settings and crossed fingers.

With manual tools, batch updates, admin panels, scripts, and platforms like Patronum, you now have the power to take back control.

Don’t wait for a breach to value what was exposed. Set the standard now. Try Patronum free for 30 days and audit your exposure today. 

Frequently Asked Questions

1. What’s the difference between “Anyone with the link” and “Restricted”?

“Anyone with the link” allows access to anyone who has the URL—no sign-in required. It’s fast but risky, especially if links are forwarded or indexed. “Restricted” limits access to specific invited users, ensuring visibility stays intentional and secure. For sensitive or regulated content, “Restricted” should be your default, while “Anyone with the link” should be reserved for temporary, low-risk sharing.

2. Can I bulk turn off link access in Google Drive?

Yes, but it depends on the method. You can select multiple files manually in Drive and switch their access to “Restricted.” However, Google Drive doesn’t let you filter files by public access. For comprehensive control, tools like Patronum let you identify and revoke public sharing across your domain—much faster and more reliably than manual cleanup.

3. Will existing links stop working after I change access to “Restricted”?

Yes. Once access is switched to “Restricted,” the file link becomes invalid for anyone not explicitly invited. They’ll see a “You need permission” screen. The link still exists, but it’s useless unless the person is on the allowed list. This change takes effect immediately.

4. How do I audit all shared links in Drive?

Google Drive doesn’t offer built-in filters for link sharing. However, you can use search operators like to:public or sharedWith:domain.com to identify exposed files. For full visibility, especially at scale, Patronum provides an audit interface that shows all publicly accessible content in one dashboard, making remediation easier.

5. Does the Admin Console revoke access from already shared files?

No. Disabling link sharing in the Admin Console prevents new “Anyone with the link” shares, but it won’t retroactively revoke existing ones. To remove current public links, admins need to use audit tools, scripts, or platforms like Patronum for bulk enforcement.

6. Is there a script to mass unshare files in Drive?

Yes. With Google Apps Script, admins or advanced users can scan Drive, detect files shared publicly, and programmatically change their access to “Restricted.” This method is efficient for domains with thousands of files but only ideal if a manual cleanup isn’t feasible and third-party tools aren’t available. We strongly recommend using third party tools like Patronum for your Google Drive Management.