Thursday, March 14, 2013

Box.com with Linux and no client using davfs2



Box.com lets you store all of your content online, so you can access, manage and share it from anywhere. Integrate Box with Google Apps and Salesforce and access Box on mobile devices. Some people use it to back up their workstations. Something that is very intriguing for Linux users is the fact that you can directly mount your box.com to a folder on Linux with davfs2. Neat!





1. First thing we need to do is to install davfs2.
For openSUSE 12.3 we will need to add the following repository in order to get it.

# zypper ar http://download.opensuse.org/repositories/filesystems/openSUSE_Factory/ openSUSE_Factory-filesystems
2. Once you have added the repository we are now ready to install it.
# zypper in davfs2
3. Now we will need a place to mount our box.com. I like to put it under my home directory. (md is an alias in SUSE)
Note: change some_user to the user id your using.
# md /home/some_user/box
4. Now we will add a line to our /etc/fstab so that it will mount each time we boot our system up. So open your /etc/fstab for editing with your choice of editor and put the following at the bottom.
Note: change some_user to the user id your using.
https://www.box.com/dav /home/some_user/box davfs rw,user,noauto 0 0
5. Now lets add a line to the bottom of our /etc/davfs2/secrets file. Open your /etc/davfs2/secrets file for editing with your choice of editor and put the following at the bottom.
Note: Make sure to use your email address and password.
https://www.box.com/dav user@email.com password
6. Edit the /etc/davfs2/davfs2.conf file and change the following line
# use_locks 1
Changed it to this
 use_locks 0
 7. Now it is time to mount our box.com to /home/some_user/box . To mount id we will use the following command.
# mount /home/some_user/box
To show that it is there run these commands:
# mount | grep box 
# df  | grep box
8. Now start using it. rsync something to it or copy something in to it using your favorite desktop environment.
# rsync -avzP  somefile.tar.gz /home/some_user/box/ 
Thats all there is to it. Now you can enjoy a client free cloud storage using davfs2 and box.com .
Enjoy!
 
Post a Comment