Difference between revisions of "Mounting Cloud Storage on Linux"

From CSEE Documentation
 
(3 intermediate revisions by one other user not shown)
Line 19: Line 19:
  
 
==Box.com==
 
==Box.com==
===Using SFTP===
 
 
Due to the way this works, ''it is '''NOT''' recommended to perform these steps since it disables the default security that campus places on box.com accounts''.
 
Due to the way this works, ''it is '''NOT''' recommended to perform these steps since it disables the default security that campus places on box.com accounts''.
====Add external password to Box====
+
===Add external password to Box===
 
This steps adds a new authentication method to a box.com account.  UMBC may no longer be able to track if this account gets compromised.  It is NOT recommended to make this change.
 
This steps adds a new authentication method to a box.com account.  UMBC may no longer be able to track if this account gets compromised.  It is NOT recommended to make this change.
  
Line 30: Line 29:
 
# Create an external password.
 
# Create an external password.
 
Note: This password must be different from your email password
 
Note: This password must be different from your email password
====Run lftp====
+
 
 +
====Using GNOME====
 +
This is the simplest method and supports full synchronization of your box account.
 +
# Open Files program (nautilus if launching from command line)
 +
# Click on "Other Locations" in the left pane
 +
# In the bottom right where it says connect to server type <pre>ftps://ftp.box.com</pre> and click connect
 +
# enter your USERNAME@umbc.edu and your box password
 +
 
 +
====Using FTPS client====
 +
If you are familiar with using the ftp command-line program and do not wish to use GNOME, you may prefer this method.
 +
=====Run lftp=====
 
Run the following command
 
Run the following command
 
   $ lftp
 
   $ lftp
Line 40: Line 49:
 
   lftp username@umbc.edu.edu@ftp.box.com:~> ls
 
   lftp username@umbc.edu.edu@ftp.box.com:~> ls
  
===Using WebDAV (DEPRECATED)===
+
====Using WebDAV (DEPRECATED 1/31/2019)====
 
This service will only work to access data from a personal computer--this will not work on CSEE maintained Linux computers.  Due to the way this works, ''it is '''NOT''' recommended to perform these steps since it disables the default security that campus places on box.com accounts''.
 
This service will only work to access data from a personal computer--this will not work on CSEE maintained Linux computers.  Due to the way this works, ''it is '''NOT''' recommended to perform these steps since it disables the default security that campus places on box.com accounts''.
====Install davfs2 Package====
+
=====Install davfs2 Package=====
=====Ubuntu, Debian, and Mint=====
+
======Ubuntu, Debian, and Mint======
 
To install davfs2 on Ubuntu, Debian or Mint:
 
To install davfs2 on Ubuntu, Debian or Mint:
 
  $ sudo apt-get install davfs2
 
  $ sudo apt-get install davfs2
=====CentOS, RHEL or Fedora=====
+
======CentOS, RHEL or Fedora======
 
To install davfs2 on CentOS, RHEL or Fedora:
 
To install davfs2 on CentOS, RHEL or Fedora:
 
  $ sudo yum install davfs2
 
  $ sudo yum install davfs2
=====Disable file locks=====
+
======Disable file locks======
 
The WebDAV share exported by Box.com does not support file locks. Thus you need to disable file locks in the davfs2 configuration file located at /etc/davfs2/davfs2.conf. Otherwise, you will encounter "Input/output error" while attempting to create a file.
 
The WebDAV share exported by Box.com does not support file locks. Thus you need to disable file locks in the davfs2 configuration file located at /etc/davfs2/davfs2.conf. Otherwise, you will encounter "Input/output error" while attempting to create a file.
 
  $ sudo vi /etc/davfs2/davfs2.conf
 
  $ sudo vi /etc/davfs2/davfs2.conf
Line 55: Line 64:
 
  use_locks      0
 
  use_locks      0
  
====Create a mount point====
+
=====Create a mount point=====
 
  mkdir ~/box.com
 
  mkdir ~/box.com
 
replace "~/box.com" with your preferred mount point
 
replace "~/box.com" with your preferred mount point
====Add yourself to usergroup====
+
=====Add yourself to usergroup=====
 
This step is only needed if you want to mount as a non-root user.
 
This step is only needed if you want to mount as a non-root user.
 
  $ sudo usermod -a -G davfs2 USERNAME
 
  $ sudo usermod -a -G davfs2 USERNAME
 
where "USERNAME" is your username
 
where "USERNAME" is your username
  
====Edit fstab====
+
=====Edit fstab=====
 
Add the following to /etc/fstab. The "user" option allows you to mount Box.com as an unprivileged non-root user.  
 
Add the following to /etc/fstab. The "user" option allows you to mount Box.com as an unprivileged non-root user.  
 
  <nowiki>https://dav.box.com/dav /home/user/box.com davfs rw,user,noauto 0 0</nowiki>
 
  <nowiki>https://dav.box.com/dav /home/user/box.com davfs rw,user,noauto 0 0</nowiki>
 
Replace "/home/user/box.com" with your own mount point.
 
Replace "/home/user/box.com" with your own mount point.
  
====Add external password to Box====
+
=====Run mount=====
This steps adds a new authentication method to a box.com account.  UMBC may no longer be able to track if this account gets compromised.  It is NOT recommended to make this change.
 
 
 
Before you connect, you must create an external password through the Box web interface.
 
# Open an internet browser and log on to box.umbc.edu
 
# Click on your name in the upper right corner. In the drop down, click on “Account Settings”
 
# The bottom section bubble should say “Create External Password.” Click “Edit password”
 
# Create an external password.
 
Note: This password must be different from your email password
 
 
 
====Run mount====
 
 
The final step is to run mount.
 
The final step is to run mount.
 
  $ mount box.com
 
  $ mount box.com
 
replacing "box.com" with the mount point used in the fstab
 
replacing "box.com" with the mount point used in the fstab
  
====When finished with box.com access====
+
=====When finished with box.com access=====
 
The box.com file system needs to be unmounted when you are done with it
 
The box.com file system needs to be unmounted when you are done with it
 
  $ umount box.com
 
  $ umount box.com
 
replacing "box.com" with the mount point used in the fstab
 
replacing "box.com" with the mount point used in the fstab

Latest revision as of 18:47, 8 January 2019

Mounting Cloud Storage on Linux

Mounting Box.com or Google Drive storage as a disk or file system is not available on CSEE/UMBC maintained machines. These steps are provided for those who run their own Linux systems.

The only way to access files on UMBC/CSEE maintained systems is by uploading/downloading files using a Web Browser to access their respective sites:

Google Drive

GNOME 3 is required to access Google Drive as a remote disk on Linux--this will not work from a CSEE maintained Linux system.

Open the GNOME Control Center (or “Settings”) application. If a desktop environment other than GNOME 3 is being used, install gnome-control-center and then run it from the command line.

Click “Online Accounts”, click the plus symbol (if the plus symbol is dimmed, click the button "Add an online account"), and add your Google account. If this control is not available, install the gnome-online-accounts package.

Enter your UMBC username and password and accept/allow GNOME to access your Google data. A copy of your credentials will be stored in the GNOME keyring.

The Google Drive will be accessible from Nautilus, the GNOME3 file manager. The drive name will be your UMBC email address. If the Google Drive isn't showing up, check to make sure that the gvfs-goa package is installed.

When you are finished accessing your Google Drive, eject the volume from a Nautilus window. Then, open GNOME Control Center, click Google, and click the minus symbol.

Box.com

Due to the way this works, it is NOT recommended to perform these steps since it disables the default security that campus places on box.com accounts.

Add external password to Box

This steps adds a new authentication method to a box.com account. UMBC may no longer be able to track if this account gets compromised. It is NOT recommended to make this change.

Before you connect, you must create an external password through the Box web interface.

  1. Open an internet browser and log on to box.umbc.edu
  2. Click on your name in the upper right corner. In the drop down, click on “Account Settings”
  3. The bottom section bubble should say “Create External Password.” Click “Edit password”
  4. Create an external password.

Note: This password must be different from your email password

Using GNOME

This is the simplest method and supports full synchronization of your box account.

  1. Open Files program (nautilus if launching from command line)
  2. Click on "Other Locations" in the left pane
  3. In the bottom right where it says connect to server type
    ftps://ftp.box.com
    and click connect
  4. enter your USERNAME@umbc.edu and your box password

Using FTPS client

If you are familiar with using the ftp command-line program and do not wish to use GNOME, you may prefer this method.

Run lftp

Run the following command

 $ lftp
 lftp :~> set ftps:initial-prot ""
 lftp :~> set ftp:ssl-force true
 lftp :~> set ftp:ssl-protect-data true
 lftp :~> open ftps://ftp.box.com:990
 lftp :~> user username@umbc.edu
 lftp username@umbc.edu.edu@ftp.box.com:~> ls

Using WebDAV (DEPRECATED 1/31/2019)

This service will only work to access data from a personal computer--this will not work on CSEE maintained Linux computers. Due to the way this works, it is NOT recommended to perform these steps since it disables the default security that campus places on box.com accounts.

Install davfs2 Package
Ubuntu, Debian, and Mint

To install davfs2 on Ubuntu, Debian or Mint:

$ sudo apt-get install davfs2
CentOS, RHEL or Fedora

To install davfs2 on CentOS, RHEL or Fedora:

$ sudo yum install davfs2
Disable file locks

The WebDAV share exported by Box.com does not support file locks. Thus you need to disable file locks in the davfs2 configuration file located at /etc/davfs2/davfs2.conf. Otherwise, you will encounter "Input/output error" while attempting to create a file.

$ sudo vi /etc/davfs2/davfs2.conf
use_locks      	0
Create a mount point
mkdir ~/box.com

replace "~/box.com" with your preferred mount point

Add yourself to usergroup

This step is only needed if you want to mount as a non-root user.

$ sudo usermod -a -G davfs2 USERNAME

where "USERNAME" is your username

Edit fstab

Add the following to /etc/fstab. The "user" option allows you to mount Box.com as an unprivileged non-root user.

https://dav.box.com/dav /home/user/box.com davfs rw,user,noauto 0 0

Replace "/home/user/box.com" with your own mount point.

Run mount

The final step is to run mount.

$ mount box.com

replacing "box.com" with the mount point used in the fstab

When finished with box.com access

The box.com file system needs to be unmounted when you are done with it

$ umount box.com

replacing "box.com" with the mount point used in the fstab