Linux: Mount Account Locally

Cloud storage nowadays has create a trend on storing and accessing data from any where around the world. 2 most popular cloud storage providers are Dropbox and In this post, I am going to show you on how to mount account inside the Linux box. You are required to have a account, which is free if you register for personal plan and it comes with 5 GB online storage space.

We will use davfs2 to mount account via WebDAV. Dropbox do not offer this feature at the moment. Variable that I used as follows:

OS: CentOS 6.2 64bit username: [email protected] password: MyGu1234
Mount point: /mnt/box/

1. To use the simplest way on installation, we will use RPMforge repository:

$ cd /usr/local/src
$ rpm --import
$ wget
$ rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

2. Once done, lets install davfs2 via yum:

$ yum install -y davfs2

3. Create the mount point:

$ mkdir /mnt/box

4. Add following line to /etc/fstab:    /mnt/box    davfs    rw,user,noauto 0 0

5. Add account information into /etc/davfs2/secrets using text editor:  [email protected]  MyGu1234

Notes: If you use special characters in your password use a forward slash in front of the special character (thanks to Keith for this highlight)

6. Change the lock mechanism of mounted filesystem. Open /etc/davfs2/davfs2.conf and find following value:

#use_locks    1

And change to:

use_locks     0

7. Mount the partition:

$ mount /mnt/box

Done! Now you can start to sync your files to your cloud storage by copying the files into /mnt/box directory. Login into account and verify that the files should be existed. Depending on the file size, you might need to wait for a while after copying process complete before it appears in the account.

Following screenshot is the account. I just sync my public_html backup files to the cloud storage.

Happy ‘clouding’. Cheers!