How can I use box.com to sync my home directory across machines?
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:
- http://maketecheasier.com/auto-mount-box-net-to-linux-desktop/2012/03/27
- http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/
- boxlinux: https://github.com/sebastiansam55/boxlinux
- 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).
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.
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=
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.