My objective is to use Google Drive to store media files for a Wordpress multisite using Fuse, and so far I am able to mount Google Drive with google-drive-ocamlfuse as root. I can mount the Google Drive as /mnt/google-drive and do cp, rm, mkdir, edit files as root, etc but am not able to change file suid/guid.

I cp -R the directory contents from /wordpress/wp-content/uploads to the /mnt/google-drive/wordpress/wp-content/uploads, and then mv the original uploads/ folder to uploads.original/, so I can make a symbolic link:

ln -s /mnt/google-drive/wordpress/wp-content/uploads uploads

When I try to uploads files through Upload New Media in Wordpress, I get an error:

“3.jpg” has failed to upload due to an error Unable to create directory wp-content/uploads/sites/6/2013/10. Is its parent directory writable by the server?"

I have tried using -o allow_other but to no avail. The suid/guid of the files on Google Drive are all root:root and I'm guessing that is why Wordpress is unable to write to it. I have also tried using -o uid and gid flags but it doesn't change the resulting file or directory permissions on Google Drive.

Any suggestions on what I can do?


Use the WP-Stateless plugin to serve Wordpress media files from your Google Cloud Storage bucket. You can have GCS bucket serve as a backup, a CDN, or have media files served directly & entirely off of GCS i.e. 'stateless mode' where no media files will be kept on your server's persistent disk.

There are limitations to running the mounted GCS bucket as a traditional file system. For one, latency is an issue and you'd be missing traditional filesystem features like renaming or permission modifications. George covers some details here: Anyone using “Google Cloud Storage Fuse” in production?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.