Tried App – External Storage Support for Google Drive
Frist thing I tried is to use External Storage Support for Google Drive app in NextCloud Apps page. You will need to search Google Drive to find it out. It is not tested app.
There is untested app in NextCloud which I installed and tested but does not work for me.
I have tried to get Google Drive client id and secret to put into settings, but could not save it.
Eventually, I thought I might be able to try use rclone to mount Google drive into local and map it into NextCloud docker to add as local.
n) New remote s) Set configuration password q) Quit config n/s/q> n name> gd Type of storage to configure. Enter a string value. Press Enter for the default (""). Choose a number from below, or typein your own value 1 / 1Fichier \ "fichier" 2 / Alias for an existing remote \ "alias" 3 / Amazon Drive \ "amazon cloud drive" 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc) \ "s3" 5 / Backblaze B2 \ "b2" 6 / Box \ "box" 7 / Cache a remote \ "cache" 8 / Dropbox \ "dropbox" 9 / Encrypt/Decrypt a remote \ "crypt" 10 / FTP Connection \ "ftp" 11 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 12 / Google Drive \ "drive" 13 / Google Photos \ "google photos" 14 / Hubic \ "hubic" 15 / JottaCloud \ "jottacloud" 16 / Koofr \ "koofr" 17 / Local Disk \ "local" 18 / Mega \ "mega" 19 / Microsoft Azure Blob Storage \ "azureblob" 20 / Microsoft OneDrive \ "onedrive" 21 / OpenDrive \ "opendrive" 22 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 23 / Pcloud \ "pcloud" 24 / Put.io \ "putio" 25 / QingCloud Object Storage \ "qingstor" 26 / SSH/SFTP Connection \ "sftp" 27 / Union merges the contents of several remotes \ "union" 28 / Webdav \ "webdav" 29 / Yandex Disk \ "yandex" 30 / http Connection \ "http" 31 / premiumize.me \ "premiumizeme" Storage> 12 # it might change to other numbers. Please make sure it is Google Drive. Google Application Client Id - leave blank normally. client_id> #blank Google Application Client Secret - leave blank normally. client_secret> #blank Service Account Credentials JSON file path - needed only if you want use SA instead of interactive login. service_account_file> #blank Choose a number from below, or typein your own value 1 / Full access all files, excluding Application Data Folder. \ "drive" 2 / Read-only access to file metadata and file contents. \ "drive.readonly" / Access to files created by rclone only. 3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ "drive.file" / Allows read and write access to the Application Data folder. 4 | This is not visible in the drive website. \ "drive.appfolder" / Allows read-only access to file metadata but 5 | does not allow any access to read or download file content. \ "drive.metadata.readonly" scope> 1 ID of the root folder Leave blank normally. Fill in to access "Computers" folders. (see docs). Enter a string value. Press Enter for the default (""). root_folder_id> Service Account Credentials JSON file path Leave blank normally. Needed only if you want use SA instead of interactive login. Enter a string value. Press Enter for the default (""). service_account_file> Edit advanced config? (y/n) y) Yes n) No y/n> n #enter n Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) No y/n> n #entter n If your browser doesn''t open automatically go to the following link: https://accounts.google.com/o/
#use browser to open that link and get authentication code Log in and authorize rclone for access Enter verification code>hjdd #paste the authentication code Configure this as a team drive? y) Yes n) No y/n> n #enter n -------------------- [gd] type = drive client_id = 85142871 client_secret = D82gPc scope = drive token = {"access_token":"y102Z"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y #enter y Current remotes:
Name Type ==== ==== gd drive
e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q #enter q save and quit
It might be a little different from above steps to configure rclone. But you should be able to use your browser to get authentication code as below and paste into configuration:
3 Mount rclone configured Google Drive gd to local folder
So far, all worked, but I can’t mount my Google Drive folder in Nextcloud. Every other folder works, just this not.
When I try these comments:
chown -R www-data:www-data /home/gdrive
chmod 755 /home/gdrive
I just get an error message “Permission denied”.
What do I need to change to be able to integrate my mounted Google Drive into Nextcloud?
Thx for this tutorial.
So far, all worked, but I can’t mount my Google Drive folder in Nextcloud. Every other folder works, just this not.
When I try these comments:
chown -R www-data:www-data /home/gdrive
chmod 755 /home/gdrive
I just get an error message “Permission denied”.
What do I need to change to be able to integrate my mounted Google Drive into Nextcloud?
are you in sudo mode?