Box.com (previously Box.net) is an online cloud storage provider targeting both individual users and enterprise customers. Box.com users can access its cloud storage via web interface or multi-platform mobile client software.
As of writing, Box.com does not offer a native Linux client. Thankfully, however, they make available WebDAV servers which export your Box.com account as a WebDAV share, so you can mount your Box.com account and access it via WebDAV over HTTP/HTTPS. Here are two different ways to mount Box.com account on Linux via WebDAV.
Mount Box.com storage account by Nautilus
You can mount and access your Box.com storage account via Nautilus -- file manager for the GNOME desktop. Open up Nautilus, and click on "Connect to Server" under "File" on its menu.
Then type in the following server and user details.
After you are successfully connected to a Box.com's WebDAV server, your Box.com account will be accessible on Nautilus as follows.
If you want to have Box.com account mounted automatically on Nautilus, you can use the "bookmark" feature of Nautilus. That is, right-click on the Box.com mount on Nautilus, and select "Add Bookmark" menu.
After bookmarking, you will see the saved bookmark on the left top corner of Nautilus. In order to re-mount your Box.com account later, simply click on this bookmark.
Mount Box.com storage account via davfs2
The second method is to use davfs2 (WebDAV Linux File System) which enables you to access a remote WebDAV share via traditional file system interfaces.
To install davfs2 on Ubuntu, Debian or Mint:
To install davfs2 on CentOS, RHEL or Fedora:
Next, create a local mount point.
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.
In addition, if you want to be able to mount Box.com's WebDAV share as a non-root regular user, follow the distro-specific procedure below.
Mount Box.com as a non-root user on Debian, Ubuntu or Mint
Reconfigure davfs2 by using dpkg-reconfigure as follows.
At the dpkg-reconfigure screen (as shown below), click on "Yes" button.
After this, add yourself to a Linux group called "davfs2".
Mount Box.com as a non-root user on CentOS, RHEL or Fedora
Simply run the following command.
Once you have followed the above distro-specific instruction, add the following to /etc/fstab. The "user" option allows you to mount Box.com as an unprivileged non-root user. Replace "/home/xmodulo/box.com" with your own mount point.
https://dav.box.com/dav /home/xmodulo/box.com davfs rw,user,noauto 0 0
Now you can go ahead and mount your Box.com account by running mount command as a regular user. When asked for username and password, enter your Box.com account username/password.
Please enter the username to authenticate with server https://dav.box.com/dav or hit enter for none. Username: email@example.com Please enter the password to authenticate user firstname.lastname@example.org with server https://dav.box.com/dav or hit enter for none. Password:
If you do not want to type in username/password every time you mount, put your Box.com login credential information in the following file.
$ vi ~/.davfs2/secrets
https://dav.box.com/dav email@example.com my_box_com_password
To verify that mount was successful, run these:
https://dav.box.com/dav on /home/xmodulo/box.com type davfs (rw,nosuid,noexec,nodev,_netdev,user=xmodulo)
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/ubuntu-root 953024420 131576980 773036612 15% / udev 4008844 4 4008840 1% /dev tmpfs 1607344 908 1606436 1% /run none 5120 0 5120 0% /run/lock none 4018352 1408 4016944 1% /run/shm none 102400 28 102372 1% /run/user /dev/sda1 233191 53518 167232 25% /boot https://dav.box.com/dav 26666664 13333332 13333332 50% /home/xmodulo/box.com
Documents lost+found Photos Videos
To umount Box.com account:
/sbin/umount.davfs: waiting while mount.davfs (pid 6824) synchronizes the cache .. OK
If you find this article useful, share this article on your social network.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.