Can't add local folder (Google Drive) to Nextcloud

Hi,

I added my Google Drive via google-drive-ocamlfuse and Rclone to my Linux system, but afterwards I can’t integrate my Google Drive folders into Nextcloud.

When I select the Google Drive folder, Nextcloud doesn’t allow me to save it. When I try any other local folder, it works.

I guess it must be some permission issue because when I try to run these terminal commands, I get a permission denied error:

chown -R www-data:www-data /home/gdrive
chmod 755 /home/gdrive

Why I can’t integrate my Drive folder? Why I get the permission denied error?

Cheers

I think if you use “/home/gdrive” than it is not “Google Drive” but “local”.

External Storagelocal

*chown -R www-data:www-data /home/gdrive*
*chmod 755 /home/gdrive*

Perhaps it does not work on the mount point.
Post more details to /home/gdrive e.g.

ls -l /home/gdrive
(only the upper directory)

mount |grep gdrive

Thanks for your reply. Yes, I use “local” in Nextcloud.

Terminal:

dee@dee-VirtualBox:~$ ls -l /home/dee/gdrive
total 0
drwxrwxr-x 1 dee dee 0 Sep 17 10:52 folder 1
drwxrwxr-x 1 dee dee 0 Aug 12 19:40 folder 2
drwxrwxr-x 1 dee dee 0 Dec 5 2019 folder 3
drwxrwxr-x 1 dee dee 0 Aug 12 19:43 folder 4

dee@dee-VirtualBox:~$ mount |grep gdrive
gd: on /home/dee/gdrive type fuse.rclone (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

You must mount the directory not in your user dir /home/dee.
Use e.g. /home (-> /home/gdrive).

Also you must use the apache2/nextcloud user.
On Debian/Ubunti it is www-data with group www-data.

I have to say my Linux skills are basic, therefore the second part I didn’t fully understand “Also you must use the apache2/nextcloud user”.

Nevertheless, I created now the “gdrive” folder under /home but when I try to mount my Google Drive there, I get a different error message:
~$ sudo rclone mount gdrive: /home/gdrive/

2021/09/20 00:02:56 mount helper error: fusermount: failed to access mountpoint /home/gdrive: Transport endpoint is not connected
2021/09/20 00:02:56 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

Is there a client user:group setting in rclone.conf? If yes change from dee or dee:dee to www-data or www-data:www-data .

Then test:

chown www-data:www-data /home/gdrive
sudo www-data mount gdrive: /home/gdrive/