Mount your box.net (box.com) account in linux

R

Rob

Guest
Did your box.net mount start failing recently? They've changed a couple things.. use this guide to set it up again..

First, install davfs
Red Hat based:
# yum install davfs2

Debian based:
# apt-get install davfs2

Now, add the mount point:
# mkdir /box

Add this line to your /etc/fstab:
Code:
https://www.box.com/dav /box davfs rw,user,noauto 0 0

Add this line to the bottom of the /etc/davfs2/secrets file (replace with your email address and password)
Code:
https://www.box.com/dav [email protected] password

Edit the /etc/davfs2/davfs2.conf
Change:
# use_locks 1
to
use_locks 0

Now mount it!
# mount /box

Show that it's there with 'mount' or with 'df'

Now.. rsync something to it. Here, i'm rsyncing a 1gb tgz file:
Code:
[root@station-222 home]# rsync -avz --progress rob-test.tgz /box/
sending incremental file list
rob-test.tgz
  1154875454 100%   61.06MB/s    0:00:18 (xfer#1, to-check=0/1)
sent 1155263231 bytes  received 31 bytes  59244269.85 bytes/sec
total size is 1154875454  speedup is 1.00
[root@station-222 home]#

It took hardly any time at all over a fios connection - 18 seconds @ 61mb/sec
View attachment 97
 

Attachments

  • box_01.png
    box_01.png
    41.1 KB · Views: 10,377


Very useful, awesome! However, it is mounted like read-only for my normal user. I did a chown and chgrp for my username on the /box directory but it is still impossible to modify the existing files because only root can mount it, and so the files in the folder are owned by root. The "mount -a" command doesn't work with my user. Do you have a fix?

Thanks again for your awesome article!
 
This is so useful! I use Box on my Playbook, so I'm gonna try this...fingers crossed!
 
Wow i thought using wput and wget was fun, i really use Box on my Windows and mobile phone to sync and backup few of my important documents and files.

I hope this will be equally helpful for syncing my server files into box. Thanks a lot! :D
 
Don't use wedav. It's a just ugly.
Use sshfs or CIFS. Webdav is in my opion as valadation of the HTTP Protocol, also it's create much to much overhaed.

Why not using a protocol that has be design from the first moment for this?

so far
Akendo
 
OK :)

I love sshfs btw..

How would you do it using sshfs and/or CIFS?

Don't use wedav. It's a just ugly.
Use sshfs or CIFS. Webdav is in my opion as valadation of the HTTP Protocol, also it's create much to much overhaed.

Why not using a protocol that has be design from the first moment for this?

so far
Akendo
 
sshfs depends on a simply ssh server. You have install the fuse framework on your locale system. But after this you just trade it like a mount point.
The advantaces are:
  1. Encrypted
  2. No extra Deamon required
  3. Caching directory content(important!)


The command is:
Code:
sshfs hostname: mountpoint

CIFS is need when you have need for acl. To explains this it would take to long.

so far
akendo
 
sshfs depends on a simply ssh server. You have install the fuse framework on your locale system. But after this you just trade it like a mount point.
The advantaces are:
  1. Encrypted
  2. No extra Deamon required
  3. Caching directory content(important!)


The command is:
Code:
sshfs hostname: mountpoint

CIFS is need when you have need for acl. To explains this it would take to long.

so far
akendo

Looks clever... but you could elaborate a little for us :p
 
sshfs depends on a simply ssh server. You have install the fuse framework on your locale system. But after this you just trade it like a mount point.

Excellent! I just installed sshfs from the Fedora repository and used it to mounted one PC's drive on another over my house network. This seems like a very useful tool. I've heard of it before, but never got around to trying it.

But my PC is an SSH server. In order to mount a box.com directory using sshfs, box.com must also be an SSH server.

Is it?

I looked around their web site and it's typically frustrating--they talk a lot and say a little. I searched the knowledge base for ssh and protocol and got no hits. When I searched for dav, which Rob is using from a Linux platform, I found it says, "Box currently supports connection to WebDAV exclusively on Apple iOS. ... WebDAV is currently not supported for other platforms or for desktop integration."

How very unappealing. But oh how amusing that Rob got it work with Linux davfs2 anyway.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

If I ever do manage to find a drive in the clouds that I can mount on my Linux PC, I'll mount the drive a second time with encfs to encrypt it. That is, I not only want the data encrypted as it's transferred, but I want it encrypted so the provider can't snoop. (You KNOW that Google will snoop through everythig you store unencrypted on Google Drive.)
 
Been a while, but....
Just to update this for now, the URL has been changed, and the first 3w's need to be replaced with DAV (fstab + secrets).
I can't include the full URL as I am a new user.....

Otherwise, still works!
Thanks.
 

Staff online

Members online


Latest posts

Top