16

Box.com does not support Linux, although there is a feature request with enthusiastic support.

The comments to the feature request provide a number of ways to use Box with Linux, by mounting a WebDav folder.

Here are some example solutions using WebDav or otherwise:

  1. http://maketecheasier.com/auto-mount-box-net-to-linux-desktop/2012/03/27
  2. http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/
  3. boxlinux: https://github.com/sebastiansam55/boxlinux
  4. Conduit https://live.gnome.org/Conduit

Would any of these solutions be reasonably stable and bug-free?

Of course there are other great services (UbuntuOne, Dropbox, etc), but my institution has signed up for Box (and I thus have the space that I will require).

1

4 Answers 4

11

Officially Box Sync client for Linux does not have and has no plans for development because it is not a priority. Although this method can assess alternative.

First of all you need to install the davfs2 package. You can do this by issuing the following command in terminal: (or you can also use your favorite package manager to install WebDAV)

sudo apt-get install davfs2 
sudo adduser username davfs2

Now you should create a dedicated box.com folder.

mkdir /home/username/box.com
echo "https://dav.box.com/dav /home/username/box.com davfs rw,user,noauto 0 0" | sudo tee -a /etc/fstab
sudo chmod u+s /usr/sbin/mount.davfs

Now you have to switch to a regular system user. This can be accomplished by issuing the following command:

su username

Next you should disable the file locks in your davfs2 configuration file, insert your box e-mail and password, change the privileges to the secrets file containing your credentials and finally to mount your account:

echo "use_locks 0" > ~/.davfs2/davfs2.conf   

If this command gives you "No such file or folder" error, just create the folder and file with the command below

mkdir ~/.davfs2/
touch  ~/.davfs2/davfs2.conf

then proceed with these commands.

read -p "box.com email: " boxuser
read -sp "box.com password: " boxpass
echo "https://dav.box.com/dav $boxuser $boxpass" > ~/.davfs2/secrets 
chmod 600 ~/.davfs2/secrets
mount /home/username/box.com

Initially it may take some time in order to synchronize all of the files in your box with the newly created folder but after that you should be able to create, delete and overwrite all of your files.

5
  • sudo echo “https://www.box.com/dav /home/username/box.com davfs rw,user,noauto 0 0″ >> /etc/fstab command gives me Permission denied error...
    – charlie
    May 17, 2013 at 19:32
  • Also cant find the config file - echo “use_locks 0″ > ~/.davfs2/davfs2.conf
    – charlie
    May 17, 2013 at 19:55
  • @charlie I've corrected the command
    – Anwar
    Oct 8, 2013 at 12:06
  • Just tried this guide and I believe there is one more step to do. The first time I tried to mount the filesystem I got an authentication error, but... I received and SMS from Box saying that I have to use a special verification code in order to use WebDAV. I changed ~/.davfs2/secrets to read something like https://dav.box.com/dav [email protected] "box verification code" (notice the double quotes) and it worked.
    – Kos Prov
    Mar 3, 2015 at 17:17
  • davfs2 works allright, but it's pretty slow when navigating between folders (at least when using Dolphin). A proper offline sync would be preferable. Mar 1, 2018 at 21:44
4

We use Box with Storage Made Easy's Linux App which gives us a mapped drive and sync for Box. It works fine for us and Storage Made Easy is on Box's partner page.

The App is free, works with Ubuntu fine (I'm using with 12.04) and you only need to sign up for a free account to use it. You can download it at:

http://storagemadeeasy.com/index.php?p=&type=&showlogin=&message=

1
  • Sounds nice, but the current version 4.8.3 Ubuntu deb file doesn't install on my Kubuntu 16.04 installation because "Depends: libfuse2 (= 2.9.4-1ubuntu3) but 2.9.4-1ubuntu3.1 is to be installed" Mar 1, 2018 at 21:59
2

I was facing several issues while following the method in the answer above. And then I found this link :
http://www.liberiangeek.net/2012/03/automatically-mount-box-cloud-storage-in-ubuntu-12-04-11-10/
And it has a lot of answers to the blank walls I was facing.

Excerpt of the method in code:

sudo apt-get install davfs2  

run the command below to reconfigure davfs2 so that regular users can mount storages

sudo dpkg-reconfigure davfs2  

run the command below to copy davfs2 folder to your home directory

sudo cp -r /etc/davfs2/ /home/`<username>`/.davfs2    

Then run the commands below to change the permissions so that you’re the owner

sudo chown -R `<username>` /home/`<username>`/.davfs2/  
gedit ~/.davfs2/secrets  

When the file opens, add the line shown below at the end and save.

https://www.box.com/dav <box_username> <box_password>

sudo gedit /etc/fstab   

Then add the line shown below at the end and save the file.

https://www.box.com/dav/ /home/<username>/box davfs _netdev,rw,user 0 0`
sudo adduser `<username>` davfs2  
mkdir ~/box  

Remember to replace all with your box account username, and with your box account password.

1
  • "the method in the answer above" does not clarify which of the "above" answers you are referring to. Are you referring to askubuntu.com/a/243215/340383 ?
    – bgoodr
    Feb 28, 2016 at 17:23
0

The best solution I have found is webdav-sync: http://www.re.be/webdav_sync/index.xhtml This is a Java program that offers bidirectional offline syncing with Box (and other WebDAV folders).

The only problem I have encountered is that it may choke on files/directories with non-English characters.

A command like java -Dbe.re.http.no-expect100 -jar ~/.local/bin/webdav_sync1_1_9.jar -r -u https://username:password@URL -d ~/Box-sync/ -bi -i 30 should do the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .