Owncloud and google storage bucket

I have been trying for the past few days to add a google storage bucket to my owncloud instance via setting it up as a local drive.

I am using gcsfuse and I can successfully mount it and have owncloud users view and download items from the bucket via the website. However no matter how much I try and fiddle with permissions (granting www-data or daemon ownership of the mounted folder or setting folder permissions to 777) the user on the owncloud website cannot upload or create files/directories.

This is the command I use with gcsfuse, I suspect its gcsfuse that messes with the permissions because I can successfully access the created folder PRIOR TO MOUNTING WITH GCSFUSE.

sudo gcsfuse --file-mode "770" --dir-mode "770" -o allow_other -o nonempty --uid=1 --gid=1 nameofbucket /mnt/gcs-bucket/

and I can fiddle with permissions via sudo -u www-data

Has anybody successfully done this? I got it to work once but I have not been able to recreate it.

Hi,

--uid=1 --gid=1 is most likely wrong and should be the user and group id of www-data

The following FAQ might also contain some additional info. Its written for local storages but its also valid for external mounted ones:

Hi Real Rancor,

How do I determine the uid and gid of the users trying to write to the bucket? Wouldn't the simplest soluton be to create a group of user ids with these permissions?

Hi,

have a look at the gcfuse documentation. These are the permissions on the local filesystem, not of the bucket: