Google Drive offers a program (which can be installed on Windows and Mac) to be able to access your files in the cloud through a convenient folder synchronized in real time. If the PC is stolen or shared with other users, our privacy is at great risk: in fact we are "Giving" access to our files on Drive to anyone who has access to our PC. Changing the Google password is of little use in these cases, since the synchronized files will still be available on the local folder. To solve the problem we have to “Centralize” access to Google Drive, by installing the latter on a network device capable of hosting our files in the cloud. In this guide we will see how to install Google Drive on NAS.
The guide is based on a Thecus NAS in my possession, but at the end of the article we will be able to find add-ons and procedures for other manufacturers.
Google Drive is NAS
Use scenario
To understand the usefulness of centralizing access to Google Drive, here is the typical usage scenario. We have several PCs in the local network (LAN) and often our workstation is not fixed. Instead of installing Google Drive on all PCs, we can install the cloud service on the NAS, which will take care of keeping the synchronized folder in its space and regulating access with user and password of the protocol chosen for file sharing (FTP, SFTP etc.). This will offer great security for our files: only those with login credentials will be able to access the shared folders of the NAS, and among these there will also be the Google Drive folder. It will also be possible to manage multiple users by regulating any permissions and accesses.
This procedure can be replicated if we work in the office and do not want to leave Google Drive to prying eyes: we can install Google Drive on home NAS and, via the Internet and port forwarding of network services (FTP for example), access our cloud space at any time without the risk of leaving traces on “unauthorized” PCs.
Google Drive is NAS Thecus
The NAS in my possession offers a Linux-based operating system, so installing Google Drive means installing the FUSE wrapper that allows you to access the Google service.
The form to manage Google Drive is often available in the section Applications from the NAS.
Once installed we will have to create the folder on the NAS that will be the "base" for the cloud service.
The item indicated by the arrow must not be activated, otherwise the folder will be visible with the anonymous access of SAMBA (SMB), making our efforts to improve privacy useless.
To regulate access to this folder we will use ACL, with which to adjust the permissions of the various users on the NAS.
The ftpuser user was created for accessing the NAS via FTP, but we can adjust the permissions of any other user (or group of users). For my user I have chosen full permissions (Read / Write). Don't forget to also set permissions for the user group (basic users).
Now we can open the previously downloaded Gdrive module to finish the configuration.
We copy the link indicated to obtain the authorization code for our personal Drive (we will have to use a browser with our active Google account).
We will get the code for authentication.
Let's copy it into the field authentication code. We will thus have guaranteed access to Drive for our NAS.
To finish the procedure, just mount the Google folder by inserting the following string into the module.
gdfs -o big_writes allow_other /var/cache/gdfs.creds /raid/data/
In place of the created folder we will have to enter the name of the folder we have reserved for Drive.
NOTE: the paths and steps described can be very different depending on the NAS model you are using.
Guides for other NAS manufacturers
To add Drive on other types of NAS, I refer you to the dedicated guides.
- Cloud Station di Synology
- Cloud Drive Sync di QNAP