Skip to content

Commit

Permalink
Top level folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Dec 6, 2024
1 parent 12c1d67 commit 2eb390a
Showing 1 changed file with 65 additions and 39 deletions.
104 changes: 65 additions & 39 deletions protocols/googledrive.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,114 +22,140 @@ Connect to your [Google Drive](http://drive.google.com/) to store plain files.
### Authentication

:::{attention}
Using prior versions to 4.12.0 (Mountain Duck) or 8.4.0 (Cyberduck), you might **not** be able to connect to Google Drive anymore because of the deprecated OAuth out-of-band flow.
Using prior versions to 4.12.0 (Mountain Duck) or 8.4.0 (Cyberduck), you might **not** be able to connect to Google
Drive anymore because of the deprecated OAuth out-of-band flow.
:::

Google Drive uses OAuth 2 to allow Cyberduck to access your files on Google Drive. Choose your account email as the username in the bookmark and choose *Allow* on the website opened in your default web browser to allow Cyberduck to *View and manage the files in your Google Drive*. The authorization code will be submitted to Cyberduck automatically. Subsequent connections will not require authorization, unless the refresh token itself is expired due to inactivity.
Google Drive uses OAuth 2 to allow Cyberduck to access your files on Google Drive. Choose your account email as the
username in the bookmark and choose *Allow* on the website opened in your default web browser to allow Cyberduck to
*View and manage the files in your Google Drive*. The authorization code will be submitted to Cyberduck automatically.
Subsequent connections will not require authorization, unless the refresh token itself is expired due to inactivity.

:::{admonition} Advanced Protection Program
:class: warning

Using *[Advanced Protection Program](https://support.google.com/accounts/answer/7539956#non-goog_apps&zippy=%2Ccan-i-use-non-google-apps-services-or-apps-script-with-advanced-protection)* will cause the OAuth login flow to fail with the error message: `400 admin_policy_enforced`.
Using
*[Advanced Protection Program](https://support.google.com/accounts/answer/7539956#non-goog_apps&zippy=%2Ccan-i-use-non-google-apps-services-or-apps-script-with-advanced-protection)*
will cause the OAuth login flow to fail with the error message: `400 admin_policy_enforced`.
:::

### Google Apps Accounts

To access the Google Docs storage of your company's [Google Apps](https://workspace.google.com/features/) Account, use your email address connected to your Google Apps account for the username.
To access the Google Docs storage of your company's [Google Apps](https://workspace.google.com/features/) Account, use
your email address connected to your Google Apps account for the username.

### Google Account With 2-Step Verification

Refer to [Signing in using application-specific passwords](http://support.google.com/accounts/bin/answer.py?answer=185833) on how to set an application-specific password to access Google Drive with 2-step verification enabled for your Google Account.
Refer
to [Signing in using application-specific passwords](http://support.google.com/accounts/bin/answer.py?answer=185833) on
how to set an application-specific password to access Google Drive with 2-step verification enabled for your Google
Account.

:::{admonition} Multiple Accounts
:class: tip

You can connect to multiple accounts at the same time. Create a new bookmark for every account and run through the OAuth flow. Make sure to log out in your browser prior setting up a new bookmark to make sure the new bookmark is linked to a newly authenticated account.
You can connect to multiple accounts at the same time. Create a new bookmark for every account and run through the OAuth
flow. Make sure to log out in your browser prior setting up a new bookmark to make sure the new bookmark is linked to a
newly authenticated account.
:::

### Reset OAuth Tokens

If you have accidentally logged in with the wrong Google Drive Account or want to change the login of the Google Drive bookmark delete the current bookmark and create a new one to start a new authentication flow.
If you have accidentally logged in with the wrong Google Drive Account or want to change the login of the Google Drive
bookmark delete the current bookmark and create a new one to start a new authentication flow.

Alternatively, you can reset the OAuth token by deleting the entries related to `duck:googledrive?user=(user)` out of the *Windows Credential Manager* or on macOS the entries related to `accounts.google.com` out of *Keychain*.
Alternatively, you can reset the OAuth token by deleting the entries related to `duck:googledrive?user=(user)` out of
the *Windows Credential Manager* or on macOS the entries related to `accounts.google.com` out of *Keychain*.

### Custom OAuth Client ID

You can register a [custom OAuth 2.0 client ID](profiles/google_client_id.md) with Google to operate independently of our registered client ID.
You can register a [custom OAuth 2.0 client ID](profiles/google_client_id.md) with Google to operate independently of
our registered client ID.

## Cyberduck CLI

You can list the root contents of your Google Drive with [Cyberduck CLI](https://duck.sh/) using

```
duck --list googledrive:/
```

Refer to the [Cyberduck CLI](../cli/index.md) documentation for more operations. For subsequent invocations make sure to include the `--username` parameter and set it to the email address registered with Google to allow the lookup of previously saved OAuth tokens.
Refer to the [Cyberduck CLI](../cli/index.md) documentation for more operations. For subsequent invocations make sure to
include the `--username` parameter and set it to the email address registered with Google to allow the lookup of
previously saved OAuth tokens.

## Features

### Top Level Folders

The following virtual top level folders are displayed:

| Folder Name | Contents |
|----------------|:-----------------------------------------------------------------:|
| My Drive | Personal files |
| Shared Drives | Shared drives for teams |
| Shared with me | Documents and folders shared with you from another Google account |

It is not possible to create additional top level folders or files.

:::{admonition} Mountain Duck
:class: tip
Set the _Path_ in the [Bookmark](../cyberduck/bookmarks.md) to `/` to show the top level folders. By default only the
contents of _My Drive_ are shown.
text
:::

### Search

You can [search recursively](../cyberduck/browser.md#filter-and-search) for files fast without browsing folders first.

### Versions

A list of file versions can be viewed in the *Versions* tab of the *[Info](../cyberduck/info.md#versions)* window. Additionally, versions of the list can be deleted.
A list of file versions can be viewed in the *Versions* tab of the *[Info](../cyberduck/info.md#versions)* window.
Additionally, versions of the list can be deleted.

### Deleting Files and Folders

Deleted files are trashed instead of being permanently deleted. This feature is enabled by default. It can be disabled using a [hidden configuration option](../tutorials/hidden_properties.md).
Deleted files are trashed instead of being permanently deleted. This feature is enabled by default. It can be disabled
using a [hidden configuration option](../tutorials/hidden_properties.md).

```
browser.delete.trash=false
```

### Documents
### Google Docs Documents

#### Google Docs Documents

For Google Docs documents (*Docs, Sheets, Slides*), URL shortcut files are displayed that point your web browser to the document in Google Docs.
For Google Docs documents (*Docs, Sheets, Slides*), URL shortcut files are displayed that point your web browser to the
document in Google Docs.

- `.webloc` on macOS
- `.url` on Windows

:::{attention}
*Google Docs* files can't be managed (renamed, moved, or deleted) within Mountain Duck or Cyberduck.
*Google Docs* files can't be managed (renamed, moved, or deleted) within Mountain Duck or Cyberduck.
:::

#### Team Drives

Use the regular Google Drive connection type to see the *Team Drives* besides *My Drive* and *Shared with me*.

#### Shared With Me

Documents shared with you from another Google account can be found inside the top-level folder *Shared with me*.

### Share

Create download [shares](../cyberduck/share.md#google-drive) of files or folders for others with no access to your Google Drive using *File → Share...*.
Create download [shares](../cyberduck/share.md#google-drive) of files or folders for others with no access to your
Google Drive using *File → Share...*.

## Issues

### Rate Limits

Google Drive is imposing rate limits to requests resulting in `403 Forbidden` replies indicating the *Rate Limit Exceeded* error. Make sure you have set to *Repeat failed networking tasks* in [Preferences → Connection](../cyberduck/connection.md#repeat-failed-networking-tasks) and set a delay.

### Top Level folder

It is not possible to create a top level folder in Mountain Duck or Cyberduck. Instead, the following virtual top level folders are displayed which cannot be moved or renamed:

| Folder Name | Contents |
|----------------|:------------------------:|
| My Drive | Personal files |
| Shared Drives | Shared team drives |
| Shared with me | Shared files and folders |
Google Drive is imposing rate limits to requests resulting in `403 Forbidden` replies indicating the *Rate Limit
Exceeded* error. Make sure you have set to *Repeat failed networking tasks*
in [Preferences → Connection](../cyberduck/connection.md#repeat-failed-networking-tasks) and set a delay.

### The Granted Scopes do not Give Access to all of the Requested Spaces

Please remove the previously saved OAuth tokens `Google Drive (Email) OAuth2 Access Token` saved in your keychain and reconnect to grant Cyberduck access to Google Photos.
Please remove the previously saved OAuth tokens `Google Drive (Email) OAuth2 Access Token` saved in your keychain and
reconnect to grant Cyberduck access to Google Photos.

### Abusive Files

Google Drive may require the user is acknowledging the risk of downloading known malware or other abusive files. For such files a prompt *Acknowledge the risk of downloading known malware or other abusive file* is shown when the file has been flagged by Google as possible malware.
Google Drive may require the user is acknowledging the risk of downloading known malware or other abusive files. For
such files a prompt *Acknowledge the risk of downloading known malware or other abusive file* is shown when the file has
been flagged by Google as possible malware.

0 comments on commit 2eb390a

Please sign in to comment.