Some of you may remember when Box.com was giving away 50GB of storage if you downloaded their app to your iOS or Android device. I was one who took advantage of this promotion. Once I got it though, I never really figured out what I would use it for. I did upload a few documents, gave people access to a couple of folders, but that was about it. I started to wish there was a way to access this storage as if it was a network drive instead of through their web interface. This is the method that I ended up using to mount Box.com on my Linux machine.
- Login to your Linux shell and install davfs2
sudo apt-get install davfs2
- Edit /etc/davfs2/davfs2.conf Make sure the following entry is uncommented and set to these values:
- Edit /etc/davfs2/secrets and at the end of the file, add the following line:
https://dav.box.com/dav <your Box.com email> <your Box.com password>
- Change the permissions of the secrets file
sudo chmod 600 /etc/davfs2/secrets
- Create a mount point for Box. I used /mnt/box
sudo mkdir /mnt/box
- Edit /etc/fstab and add the following line:
https://dav.box.com/dav /mnt/box davfsrw,user,noauto 0 0
- Now test it is mountable
sudo mount /mnt/box cd /mnt/box ls
- If you see files from Box, Success!
- Now test read, write, and delete functionality
echo “Hello, world” > /mnt/box/text.txt cd /mnt/box cat test.txt
- Verify the file does say “Hello, world”
- Login to your box.com account and verify the file is listed in the web interface
- Click on the file to preview the contents of the file
- Back in the terminal run these commands to test delete:
rm /mnt/box/test.txt ls /mnt/box/test.txt
- You should see “No such file or directory”
ls: cannot access /mnt/box/test.txt: No such file or directory
- Verify the file is now gone from the box.com web interface.
- That’s all there is to it. Now when you start up your Linux box, Box.com will automatically be mounted and you will be able to access Box.com as any other drive.