{"id":40757,"date":"2016-10-03T14:17:06","date_gmt":"2016-10-03T08:47:06","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=40757"},"modified":"2016-10-03T15:22:14","modified_gmt":"2016-10-03T09:52:14","slug":"mounting-google-drive-in-linux","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/mounting-google-drive-in-linux\/","title":{"rendered":"Mounting Google Drive in Linux"},"content":{"rendered":"<p><strong>Google Drive<\/strong> is an indispensable\u00a0part of our life nowadays. From sharing almost every type of file to anyone\/anywhere around the world has reduced our cost and time tremendously from self-hosting an FTP server and taking care of its security.<\/p>\n<p>From <a title=\"devOps consulting\" href=\"http:\/\/www.tothenew.com\/devops-automation-consulting\">DevOps perspective<\/a>,\u00a0it becomes even more convenient if we could have our google drive(s) synced on our server(s) as its saves the time for downloading the files and uploading it to the server.<\/p>\n<p>For mounting the google drive, there is a package named: &#8220;<strong>google-drive-ocamlfuse<\/strong>&#8221; available in Linux\u00a0that does this task for us.<\/p>\n<p>To install this package on Ubuntu follow the steps:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\nsudo add-apt-repository ppa:alessandro-strada\/ppa<br \/>\nsudo apt-get update<br \/>\nsudo apt-get install google-drive-ocamlfuse<br \/>\n[\/sourcecode]<\/p>\n<p>To authorize the google drive to the local machine, use:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\nmkdir &lt;mount_point&gt;<br \/>\ngoogle-drive-ocamlfuse &lt;mount_point&gt;<br \/>\n[\/sourcecode]<\/p>\n<p>This will open the default browser of your machine, ask for your Google credentials, then Authorization request and finally allow it to access your drive.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-40762\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/google_auth.png\" alt=\"google_auth\" width=\"446\" height=\"298\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/google_auth.png 446w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/google_auth-300x200.png 300w\" sizes=\"(max-width: 446px) 100vw, 446px\" \/><\/p>\n<p>For mounting google drive on a Linux Server:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\nmkdir &lt;mount_point&gt;<br \/>\ngoogle-drive-ocamlfuse -headless &lt;mount_point&gt;<br \/>\n[\/sourcecode]<\/p>\n<p>Instead of opening and asking for authorization in the browser, it will give you a URL for authorization, which you can open in any browser, provide authorization and copy the verification code.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-40760\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/auth.png\" alt=\"google_drive_auth\" width=\"1298\" height=\"111\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/auth.png 1298w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/auth-300x25.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/auth-1024x87.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/auth-624x53.png 624w\" sizes=\"(max-width: 1298px) 100vw, 1298px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-40764\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/verification.png\" alt=\"google_verification\" width=\"406\" height=\"131\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/09\/verification.png 406w, \/blog\/wp-ttn-blog\/uploads\/2016\/09\/verification-300x96.png 300w\" sizes=\"(max-width: 406px) 100vw, 406px\" \/><\/p>\n<p>To unmount the google drive:<\/p>\n<p>[sourcecode language=&#8221;bash&#8221;]<br \/>\nfusermount -u &lt;mount_point&gt;<br \/>\n[\/sourcecode]<\/p>\n<p>Hope after following the blog and implementing this in your project your client will be happy with your work \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Drive is an indispensable\u00a0part of our life nowadays. From sharing almost every type of file to anyone\/anywhere around the world has reduced our cost and time tremendously from self-hosting an FTP server and taking care of its security. From DevOps perspective,\u00a0it becomes even more convenient if we could have our google drive(s) synced on [&hellip;]<\/p>\n","protected":false},"author":913,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[2348,1],"tags":[1892,1161,260,574],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/40757"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/913"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=40757"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/40757\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=40757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=40757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=40757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}