> For the complete documentation index, see [llms.txt](https://docs.docontrol.io/docontrol-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docontrol.io/docontrol-user-guide/workflows/inventory-actions-quick-actions/google-drive-inventory-actions/remove-public-sharing-link.md).

# Remove public sharing link

Remove the "Anyone with the link” sharing status to ensure that selected assets cannot be shared publicly. The selected assets can still be shared with collaborators (internal or external users).

{% hint style="info" %}

* Usually each Google file has only one sharing link. If you remove the public sharing link, you automatically remove the "Anyone with the link" permission setting from the file. The file will have no sharing link whatsoever.
* You can apply this inventory action [in bulk](/docontrol-user-guide/workflows/bulk-remediation/apply-a-bulk-action.md) for up to 100,000 permissions.
  {% endhint %}

1. Navigate to **Inventory > Assets** > **Google Drive**.
2. From all assets, filter by **Sharing status** includes **Public**.
3. Select the assets you want to remediate.
4. Click **Remove sharing links** and select the **Public sharing link** remediation action:<br>

   <figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FZov7wTXDbJKEkReP7U95%2Fpublic%20link%20bulk.png?alt=media&amp;token=a1773bf3-86dc-48fc-8a8d-63415c6882d8" alt=""><figcaption></figcaption></figure>
5. If you want to run an assessment report first to see how many assets will be remediated, select [Assess and remediate](/docontrol-user-guide/workflows/bulk-remediation/apply-a-bulk-action/assess-and-remediate.md). Otherwise, select **Just remediate.**<br>

   <div align="left"><figure><img src="https://3236294211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MesrnyDMZGYg1V-tOBo%2Fuploads%2FfymVOi5Y8g7tFOqkQyYl%2FRemove%20public%20sharing%20link.png?alt=media&amp;token=1c65816f-4f78-445b-8e28-86eb77c494d1" alt="" width="563"><figcaption></figcaption></figure></div>
6. Select the permission type:
   * **Explicit** - Publicly shared links that were applied directly to the file or folder will be removed from selected assets
   * **Inherited** - Publicly shared links will be removed from some parent folders and child assets, which are outside your remediation scope
7. Select the relevant workflow. If you don't have one, [create a workflow ](/docontrol-user-guide/workflows/create-a-workflow.md)based on the relevant playbook.&#x20;
8. Click **Remediate**.\
   DoControl removes all public sharing links.

{% hint style="success" %}
When Google admin users **disable** public sharing of Google assets via the Google Admin Console, then:

* Assets granted the "Anyone with the link" permission are **not** actually shared.
* DoControl's inventory count for publicly shared assets reflects only assets that are actually shared.
* For more information, see [Troubleshooting](/docontrol-user-guide/help/troubleshooting/remediation-issues/google-drive-remediation-issues.md#public-sharing-settings-in-google-drive).
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docontrol.io/docontrol-user-guide/workflows/inventory-actions-quick-actions/google-drive-inventory-actions/remove-public-sharing-link.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
